-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
44 lines (39 loc) · 1.22 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
{
description = "CLI tools for using schnorr signatures";
inputs = {
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils.url = "github:numtide/flake-utils";
haskell-nix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskell-nix/nixpkgs-unstable";
};
outputs = inputs:
let
makeNixpkgs = system:
let projectOverlay = final: prev: {
project = final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc8107";
shell.tools = {
cabal = { };
ghcid = { };
};
};
};
in
import inputs.nixpkgs {
inherit system;
inherit (inputs.haskell-nix) config;
overlays = [ inputs.haskell-nix.overlay projectOverlay ];
};
flake = inputs.flake-utils.lib.eachDefaultSystem (system:
(makeNixpkgs system).project.flake { });
in
inputs.nixpkgs.lib.attrsets.recursiveUpdate flake {
# Must cross-compile from x86_64-linux only
packages.x86_64-linux.default =
(makeNixpkgs "x86_64-linux").pkgsCross.musl64.project.hsPkgs.schnorr-cli.components.exes.schnorr;
};
}