-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnilla.nix
47 lines (39 loc) · 1.05 KB
/
nilla.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
35
36
37
38
39
40
41
42
43
44
45
46
47
let
nilla = import (
builtins.fetchTarball {
url = "https://github.com/nilla-nix/nilla/archive/main.tar.gz";
sha256 = "sha256-8vHPd/vRbylp9C4+PMk+pf63SDzSPgfkuSdAf7VAums=";
}
);
flakelock = builtins.fromJSON (builtins.readFile ./flake.lock);
result = nilla.create (
{ config }:
{
config = {
inputs = {
nixpkgs =
let
lock = flakelock.nodes.nixpkgs.locked;
in
{
src = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
loader = "flake";
};
};
packages = builtins.mapAttrs (name: _: {
systems = [ "aarch64-darwin" ];
builder = "nixpkgs";
settings = {
pkgs = config.inputs.nixpkgs.loaded;
args = { };
};
package = import ./pkgs/${name}/package.nix;
}) (builtins.readDir ./pkgs);
};
}
);
in
result