-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
30 lines (25 loc) · 1012 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-utils.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
let
allSystems = flake-utils.lib.defaultSystems ++ [ "aarch64-darwin" ];
perSystem = (system:
let
pkgs = import nixpkgs {
system =
# aarch64-darwin is here just so that vic can run this on his setup.
# however, since nixpkgs requires haskell we fallback to x86 while
# it's available.
if system == "aarch64-darwin" then "x86_64-darwin" else system;
};
clap = pkgs.callPackage ./lib { };
tests = pkgs.callPackage ./test { inherit clap; };
checks = pkgs.lib.foldl (a: b: a // b) { }
(map (t: { ${t.name} = t; }) tests);
in { inherit clap checks; });
in flake-utils.lib.eachSystem allSystems perSystem;
}