-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
54 lines (45 loc) · 1.45 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
54
{
description = "Ambiguous random number generation in Haskell";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ ]; };
version = "AmbiguityGenerator:master";
in rec {
defaultPackage =
pkgs.haskellPackages.callCabal2nixWithOptions "ambiguity-server" ./. "" {};
packages = {
default = defaultPackage;
};
apps = rec {
ambiguity-server = {
type = "app";
program = "${self.packages.${system}.default}/bin/ambiguity-server";
};
histogram = {
type = "app";
program = "${self.packages.${system}.default}/bin/histogram";
};
draws = {
type = "app";
program = "${self.packages.${system}.default}/bin/draws";
};
default = ambiguity-server;
};
devShell = pkgs.haskellPackages.shellFor {
packages =
p: [ self.defaultPackage.${system} ];
buildInputs = with pkgs; [
haskellPackages.haskell-language-server # you must build it with your ghc to work
ghcid
cabal-install
haskellPackages.ghc-core
];
withHoogle=true;
};
});
}