tomb: clean up and use gnupg 2 instead of gnupg 1

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