tomb: clean up and use gnupg 2 instead of gnupg 1
This commit is contained in:
parent
1890b1fe9f
commit
a0598f9b34
@ -1,18 +1,23 @@
|
|||||||
{ stdenv, fetchurl, zsh, pinentry, cryptsetup, gnupg1orig, makeWrapper }:
|
{ stdenv, lib, fetchFromGitHub, gettext, zsh, pinentry, cryptsetup, gnupg, makeWrapper }:
|
||||||
|
|
||||||
let
|
|
||||||
version = "2.4";
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "tomb-${version}";
|
name = "tomb-${version}";
|
||||||
|
version = "2.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://files.dyne.org/tomb/Tomb-${version}.tar.gz";
|
owner = "dyne";
|
||||||
sha256 = "1hv1w79as7swqj0n137vz8n8mwvcgwlvd91sdyssz41jarg7f1vr";
|
repo = "Tomb";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "192jpgn02mvi4d4inbq2q11zl7xw6njymvali7al8wmygkkycrw4";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# if not, it shows .tomb-wrapped when running
|
||||||
|
substituteInPlace tomb \
|
||||||
|
--replace 'TOMBEXEC=$0' 'TOMBEXEC=tomb'
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
# manually patch the interpreter
|
# manually patch the interpreter
|
||||||
@ -20,22 +25,21 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
install -Dm755 tomb $out/bin/tomb
|
||||||
mkdir -p $out/share/man/man1
|
install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1
|
||||||
|
|
||||||
cp tomb $out/bin/tomb
|
# it works fine with gnupg v2, but it looks for an executable named gpg
|
||||||
cp doc/tomb.1 $out/share/man/man1
|
ln -s ${gnupg}/bin/gpg2 $out/bin/gpg
|
||||||
|
|
||||||
wrapProgram $out/bin/tomb \
|
wrapProgram $out/bin/tomb \
|
||||||
--prefix PATH : "${pinentry}/bin" \
|
--prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext pinentry ]}
|
||||||
--prefix PATH : "${cryptsetup}/bin" \
|
|
||||||
--prefix PATH : "${gnupg1orig}/bin"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "File encryption on GNU/Linux";
|
description = "File encryption on GNU/Linux";
|
||||||
homepage = https://www.dyne.org/software/tomb/;
|
homepage = https://www.dyne.org/software/tomb/;
|
||||||
license = stdenv.lib.licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
maintainers = with maintainers; [ peterhoeg ];
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user