nix/lib/default.nix

23 lines
611 B
Nix
Raw Normal View History

{ self, ... }@inputs:
2025-02-14 13:31:18 -06:00
let
2025-02-14 13:04:04 -06:00
forSelfOverlay =
2025-02-14 13:31:18 -06:00
if builtins.hasAttr "overlays" self && builtins.hasAttr "forSelf" self.overlays then
self.overlays.forSelf
else
(_: p: p);
in
rec {
2025-02-14 15:40:53 -06:00
inherit forSelfOverlay;
2025-02-14 13:31:18 -06:00
systems = [
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
2025-02-14 13:04:04 -06:00
forSystems = nixpkgs: nixpkgs.lib.genAttrs systems;
2025-02-16 11:17:59 -06:00
pkgsFor = nixpkgs: system: (import nixpkgs { inherit system; }).extend forSelfOverlay;
2025-02-14 13:04:04 -06:00
genPkgs = nixpkgs: func: (forSystems nixpkgs (system: func (pkgsFor nixpkgs system)));
inherit (import ./host.nix inputs) host stableHost;
2025-02-14 13:04:04 -06:00
}