-
Notifications
You must be signed in to change notification settings - Fork 114
/
flake.nix
40 lines (33 loc) · 958 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
35
36
37
38
39
40
{
description = "A Haskell re-implementation of the Nix expression language";
inputs = {
nixpkgs.url = "nixpkgs/c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad";
nix = {
url = "nix/624e38aa43f304fbb78b4779172809add042b513";
flake = false;
};
};
outputs = {
nix,
nixpkgs,
self,
} @ inp: let
l = builtins //nixpkgs.lib;
supportedSystems = ["x86_64-linux" "aarch64-darwin"];
forAllSystems = f: l.genAttrs supportedSystems
(system: f system (nixpkgs.legacyPackages.${system}));
in {
defaultPackage = forAllSystems
(system: pkgs: import ./default.nix {
inherit pkgs;
withHoogle = true;
compiler = "ghc947";
packageRoot = pkgs.runCommand "hnix-src" {} ''
cp -r ${./.} $out
chmod -R +w $out
cp -r ${nix} $out/data/nix
'';
});
devShell = forAllSystems (system: pkgs: self.defaultPackage.${system}.env);
};
}