-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
56 lines (49 loc) · 1.9 KB
/
Copy pathflake.nix
File metadata and controls
56 lines (49 loc) · 1.9 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{ description = "Put Nix in everything!";
inputs.nixpkgs.url = github:nixos/nixpkgs;
inputs.amber.url = github:amber-lang/amber;
inputs.nix.url = github:nixos/nix/2.26.2;
inputs.fakedir =
{ url = github:nixie-dev/fakedir;
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
};
nixConfig.extra-substituters = "https://nix-wrap.cachix.org";
nixConfig.extra-trusted-public-keys = "nix-wrap.cachix.org-1:FcfSb7e+LmXBZE/MdaFWcs4bW2OQQeBnB/kgWlkZmYI=";
outputs = { self, nix, nixpkgs, flake-utils, fakedir, amber, ... }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = import nixpkgs { inherit system; };
amber-lang = amber.outputs.packages.${system}.default;
in
{ packages = rec
{ default = nixie;
nixie = pkgs.callPackage ./. { inherit amber-lang; };
sources = pkgs.callPackage ./sources
{ nix-source = nix;
};
static-bins = import ./static-bins
{ inherit nixpkgs fakedir pkgs;
nix-source = nix;
libfakedir = fakedir.packages.aarch64-darwin.fakedir-universal;
};
} // (if system == "x86_64-darwin" || system == "aarch64-darwin"
then {
libfakedir = fakedir.packages.${system}.fakedir;
} else {});
checks =
let callTest = f: pkgs.callPackage f { inherit (self.packages.${system}) nixie sources static-bins; };
in {
generation = callTest ./tests/generation.nix;
rootless = callTest ./tests/rootless.nix;
migration = callTest ./tests/migration.nix;
};
devShells = {
default = pkgs.mkShell {
# These dependencies aren't involved in the build process, but are
# nice-to-haves in the dev environment
packages = with pkgs; [ bumpver libllvm ];
inputsFrom = [ self.packages."${system}".nixie ];
};
};
});
}