-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
34 lines (30 loc) · 932 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
inputs.nixlib.url = "github:nix-community/nixpkgs.lib";
inputs.flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
# Development Dependencies
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = {
self,
nixlib,
nixpkgs,
...
}: let
lib = nixlib.lib.extend (self: super: import ./attrsets.nix {lib = self;});
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin"];
# Pass this flake(self) as "POP"
polyfillInputs = self.inputs // {POP = self;};
polyfillOutput = loc:
nixlib.lib.genAttrs supportedSystems (system:
import loc {
inherit system;
inputs = polyfillInputs;
});
in {
lib = import ./POP.nix {inherit lib;};
checks = polyfillOutput ./checks.nix;
formatter = nixlib.lib.genAttrs supportedSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
};
}