-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
28 lines (24 loc) · 831 Bytes
/
flake.nix
File metadata and controls
28 lines (24 loc) · 831 Bytes
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
{
description = "My Idris 2 package";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
idris2-pkgs.url = "github:claymager/idris2-pkgs";
nixpkgs.follows = "idris2-pkgs/nixpkgs";
};
outputs = { self, nixpkgs, idris2-pkgs, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-darwin" "x86_64-linux" "i686-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ idris2-pkgs.overlay ]; };
inherit (pkgs.idris2-pkgs._builders) idrisPackage devEnv;
mypkg = idrisPackage ./. { };
runTests = idrisPackage ./test { extraPkgs.mypkg = mypkg; };
in
{
defaultPackage = mypkg;
packages = { inherit mypkg runTests; };
devShell = pkgs.mkShell {
buildInputs = [ (devEnv mypkg) ];
};
}
);
}