-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlambdananas.nix
47 lines (40 loc) · 978 Bytes
/
lambdananas.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
{
lib,
stdenv,
fetchurl,
gmp,
glibc,
makeWrapper,
withGlibc ? false
}:
stdenv.mkDerivation (finalAttrs: {
name = "lambdananas";
version = "2.4.3.2";
src = let
repo = "https://github.com/Epitech/lambdananas";
in fetchurl {
url = lib.strings.concatStringsSep "/" [
repo
"releases/download"
"v${finalAttrs.version}"
"lambdananas"
];
hash = "sha256-WcZOYCwl/tuxxRMbCwia+zXDijnVR/wyGwM4PRKwxNc=";
};
dontUnpack = true;
sourceRoot = ".";
nativeBuildInputs = [ makeWrapper ];
installPhase = let
ld-lib-path = lib.makeLibraryPath
([ gmp ] ++ (lib.optionals withGlibc [ glibc ]));
in ''
install -m755 -D $src $out/bin/lambdananas
wrapProgram $out/bin/lambdananas \
--set LD_LIBRARY_PATH "${ld-lib-path}"
'';
meta = {
description = "Epitech haskell coding style checker";
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ sigmanificient ];
};
})