Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchFromGitHub, makeWrapper 2, gettext, zsh, pinentry, cryptsetup, gnupg, util-linux, e2fsprogs, sudo 3}: 4 5stdenv.mkDerivation rec { 6 pname = "tomb"; 7 version = "2.9"; 8 9 src = fetchFromGitHub { 10 owner = "dyne"; 11 repo = "Tomb"; 12 rev = "v${version}"; 13 sha256 = "0d6vmfcf4kd0p2bcljmdnyc2fmbwvar81cc472zx86r7yc3ih102"; 14 }; 15 16 buildInputs = [ sudo zsh pinentry ]; 17 18 nativeBuildInputs = [ makeWrapper ]; 19 20 postPatch = '' 21 # if not, it shows .tomb-wrapped when running 22 substituteInPlace tomb \ 23 --replace 'TOMBEXEC=$0' 'TOMBEXEC=tomb' 24 ''; 25 26 doInstallCheck = true; 27 installCheckPhase = "$out/bin/tomb -h"; 28 29 installPhase = '' 30 install -Dm755 tomb $out/bin/tomb 31 install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1 32 33 wrapProgram $out/bin/tomb \ 34 --prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext gnupg pinentry util-linux e2fsprogs ]} 35 ''; 36 37 meta = with lib; { 38 description = "File encryption on GNU/Linux"; 39 homepage = "https://www.dyne.org/software/tomb/"; 40 license = licenses.gpl3; 41 maintainers = with maintainers; [ peterhoeg ]; 42 platforms = platforms.linux; 43 }; 44}