-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathpackage.nix
More file actions
72 lines (65 loc) · 1.48 KB
/
package.nix
File metadata and controls
72 lines (65 loc) · 1.48 KB
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
{
stdenv,
autoreconfHook,
lib,
fetchFromGitHub,
util-linux,
mergerfs,
attr,
makeWrapper,
pandoc,
coreutils,
installShellFiles,
versionCheckHook,
}:
stdenv.mkDerivation {
pname = "try";
version = "latest";
src = ./.;
# skip TRY_REQUIRE_PROG as it detects executable dependencies by running it
postPatch = ''
sed -i '/^AC_DEFUN(\[TRY_REQUIRE_PROG\]/,/^])$/c\AC_DEFUN([TRY_REQUIRE_PROG], [])' configure.ac
'';
nativeBuildInputs = [
makeWrapper
autoreconfHook
pandoc
installShellFiles
];
installPhase = ''
runHook preInstall
install -Dt $out/bin try
install -Dt $out/bin utils/try-commit
install -Dt $out/bin utils/try-summary
wrapProgram $out/bin/try --prefix PATH : ${
lib.makeBinPath [
coreutils
util-linux
mergerfs
attr
]
}
installManPage man/try.1.gz
installShellCompletion --bash --name try.bash completions/try.bash
runHook postInstall
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
preVersionCheck = ''
export version=0.2.0
'';
versionCheckProgramArg = "-v";
meta = {
homepage = "https://github.com/binpash/try";
description = "Lets you run a command and inspect its effects before changing your live system";
mainProgram = "try";
maintainers = with lib.maintainers; [
pasqui23
ezrizhu
];
license = with lib.licenses; [ mit ];
platforms = lib.platforms.linux;
};
}