tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
tomb: clean up and use gnupg 2 instead of gnupg 1
Peter Hoeg
8 years ago
a0598f9b
1890b1fe
+24
-20
1 changed file
expand all
collapse all
unified
split
pkgs
os-specific
linux
tomb
default.nix
+24
-20
pkgs/os-specific/linux/tomb/default.nix
···
1
1
-
{ stdenv, fetchurl, zsh, pinentry, cryptsetup, gnupg1orig, makeWrapper }:
2
2
-
3
3
-
let
4
4
-
version = "2.4";
5
5
-
in
1
1
+
{ stdenv, lib, fetchFromGitHub, gettext, zsh, pinentry, cryptsetup, gnupg, makeWrapper }:
6
2
7
3
stdenv.mkDerivation rec {
8
4
name = "tomb-${version}";
5
5
+
version = "2.4";
9
6
10
10
-
src = fetchurl {
11
11
-
url = "https://files.dyne.org/tomb/Tomb-${version}.tar.gz";
12
12
-
sha256 = "1hv1w79as7swqj0n137vz8n8mwvcgwlvd91sdyssz41jarg7f1vr";
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "dyne";
9
9
+
repo = "Tomb";
10
10
+
rev = "v${version}";
11
11
+
sha256 = "192jpgn02mvi4d4inbq2q11zl7xw6njymvali7al8wmygkkycrw4";
13
12
};
14
13
15
15
-
buildInputs = [ makeWrapper ];
14
14
+
nativeBuildInputs = [ makeWrapper ];
15
15
+
16
16
+
postPatch = ''
17
17
+
# if not, it shows .tomb-wrapped when running
18
18
+
substituteInPlace tomb \
19
19
+
--replace 'TOMBEXEC=$0' 'TOMBEXEC=tomb'
20
20
+
'';
16
21
17
22
buildPhase = ''
18
23
# manually patch the interpreter
···
20
25
'';
21
26
22
27
installPhase = ''
23
23
-
mkdir -p $out/bin
24
24
-
mkdir -p $out/share/man/man1
28
28
+
install -Dm755 tomb $out/bin/tomb
29
29
+
install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1
25
30
26
26
-
cp tomb $out/bin/tomb
27
27
-
cp doc/tomb.1 $out/share/man/man1
31
31
+
# it works fine with gnupg v2, but it looks for an executable named gpg
32
32
+
ln -s ${gnupg}/bin/gpg2 $out/bin/gpg
28
33
29
34
wrapProgram $out/bin/tomb \
30
30
-
--prefix PATH : "${pinentry}/bin" \
31
31
-
--prefix PATH : "${cryptsetup}/bin" \
32
32
-
--prefix PATH : "${gnupg1orig}/bin"
35
35
+
--prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext pinentry ]}
33
36
'';
34
37
35
35
-
meta = {
38
38
+
meta = with stdenv.lib; {
36
39
description = "File encryption on GNU/Linux";
37
37
-
homepage = https://www.dyne.org/software/tomb/;
38
38
-
license = stdenv.lib.licenses.gpl3;
39
39
-
platforms = stdenv.lib.platforms.linux;
40
40
+
homepage = https://www.dyne.org/software/tomb/;
41
41
+
license = licenses.gpl3;
42
42
+
maintainers = with maintainers; [ peterhoeg ];
43
43
+
platforms = platforms.linux;
40
44
};
41
45
}