-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
54 lines (52 loc) · 1.25 KB
/
default.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
{ nixpkgs
, static
# Haskell-specific stuff
, mkDerivation
, aeson
, ansi-terminal
, attoparsec
, base
, bytestring
, directory
, filepath
, process
, stdenv
, text
}:
let
projectAttrs = {
pname = "elm-doctest";
version = "0.1.0";
homepage = "https://github.com/jmackie/elm-doctest/";
description = "Doctest runner for Elm";
license = stdenv.lib.licenses.mit;
src = ./.;
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
aeson
ansi-terminal
attoparsec
base
bytestring
directory
filepath
process
stdenv
text
];
};
staticAttrs = {
enableSharedExecutables = false;
enableSharedLibraries = false;
configureFlags = [
"-frelease"
"--ghc-option=-optl=-static"
"--ghc-option=-optl=-pthread"
"--ghc-option=-optl=-L${nixpkgs.gmp6.override { withStatic = true; }}/lib"
"--ghc-option=-optl=-L${nixpkgs.zlib.static}/lib"
"--ghc-option=-optl=-L${nixpkgs.glibc.static}/lib"
];
};
in
mkDerivation (if static then projectAttrs // staticAttrs else projectAttrs)