-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
34 lines (34 loc) · 1.34 KB
/
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
{
description = "b9-vm-image-builder";
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.flake-compat.url = "github:edolstra/flake-compat";
inputs.flake-compat.flake = false;
outputs = { self, nixpkgs, flake-utils, haskellNix, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
overlays = [ haskellNix.overlay (import ./overlay.nix) ];
pkgs = import nixpkgs { inherit system overlays; };
b9flake = pkgs.b9-haskell-project.flake { };
in
b9flake // {
lib = {
inherit (pkgs) b9cOsRuntimeDeps b9cRuntimeDeps;
};
inherit overlays;
packages = b9flake.packages // rec {
inherit (pkgs) b9c b9c-unwrapped;
materializationUpdater = pkgs.runCommand "materializationUpdater"
{
nativeBuildInputs = [ pkgs.makeWrapper ];
}
''
mkdir -p $out/bin
cp ${"${pkgs.b9-haskell-project.plan-nix.passthru.generateMaterialized}"} $out/bin/materializationUpdater
wrapProgram $out/bin/materializationUpdater --add-flags nix/materialization/b9
'';
};
defaultPackage = self.packages."${system}".b9c;
});
}