-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
74 lines (66 loc) · 1.49 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
callPackage,
fetchFromGitHub,
git,
buildIdris,
lib,
installShellFiles,
makeBinaryWrapper,
nodejs,
}:
let
nodeDependencies = (callPackage ./node2nix.nix { inherit nodejs; }).nodeDependencies;
idrisAddsVersion = "0.4.1";
idrisAdds = buildIdris {
ipkgName = "idris-adds";
src = fetchFromGitHub {
owner = "mattpolzin";
repo = "idris-adds";
rev = idrisAddsVersion;
hash = "sha256-WEr6oRZ8+50G1qv7Kv62M4DRsgAa6x1BCODC1vDOQUY=";
};
};
in
buildIdris {
ipkgName = "harmony";
src = builtins.path {
path = ./.;
name = "harmony-pkg-src";
};
extraIdrisLibraries = [ idrisAdds ];
nativeBuildInputs = [
installShellFiles
makeBinaryWrapper
];
buildInputs = [
nodejs
git
];
IDRIS2_DATA = "./support";
postInstall = ''
wrapProgram $out/bin/harmony \
--prefix PATH : ${
lib.makeBinPath [
nodeDependencies
git
"$out"
]
} \
--prefix NODE_PATH : ${nodeDependencies}/lib/node_modules
'';
postFixup = ''
installShellCompletion --cmd harmony \
--bash <($out/bin/harmony --bash-completion-script) \
--zsh <($out/bin/harmony --zsh-completion-script) \
'';
installCheckPhase = ''
export harmony=$out/bin/harmony
INTERACTIVE="" make test
'';
meta = with lib; {
description = "Harmony GitHub collaboration tool";
homepage = "https://github.com/mattpolzin/harmony";
license = licenses.mit;
mainProgram = "harmony";
};
}