-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
53 lines (46 loc) · 1.54 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "A haskell.nix flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
haskellNix = {
url = "github:input-output-hk/haskell.nix";
# workaround for nix 2.6.0 bug
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.follows = "haskellNix/nixpkgs-2111";
};
outputs = { self, flake-utils, haskellNix, nixpkgs, ... }:
let
inherit (haskellNix) config;
overlays = [
haskellNix.overlay
(final: prev: rec {
cardano-cli-balance-fixer-project = final.haskell-nix.project {
compiler-nix-name = "ghc8107";
src = final.haskell-nix.haskellLib.cleanGit {
name = "cardano-cli-balance-fixer-src";
src = ./.;
};
index-state = "2022-03-15T00:00:00Z";
};
})
];
in
flake-utils.lib.eachSystem (import ./supported-systems.nix)
(system:
let
pkgs = import nixpkgs { inherit system config overlays; };
flake = pkgs.cardano-cli-balance-fixer-project.flake { };
in
nixpkgs.lib.recursiveUpdate flake {
# so `nix build` will build the exe
defaultPackage = flake.packages."cardano-cli-balance-fixer:exe:cardano-cli-balance-fixer";
# so `nix run` will run the exe
defaultApp = {
type = "app";
program = "${flake.packages."cardano-cli-balance-fixer:exe:cardano-cli-balance-fixer"}/bin/cardano-cli-balance-fixer";
};
legacyPackages = pkgs;
}
);
}