2019-03-20 09:06:23 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
2019-04-12 16:22:04 +01:00
|
|
|
, gettext, zsh, pinentry, cryptsetup, gnupg, utillinux, e2fsprogs, sudo
|
2019-03-20 09:06:23 +00:00
|
|
|
}:
|
2016-04-22 16:42:40 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tomb";
|
2019-07-03 02:42:47 +01:00
|
|
|
version = "2.6";
|
2016-04-22 16:42:40 +01:00
|
|
|
|
2017-06-05 11:02:03 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dyne";
|
|
|
|
repo = "Tomb";
|
|
|
|
rev = "v${version}";
|
2019-07-03 02:42:47 +01:00
|
|
|
sha256 = "0pr0lw1byxwkgv857zfmd8yqa03a7mckhzklrf9rkv1l6nisz0z0";
|
2016-04-22 16:42:40 +01:00
|
|
|
};
|
|
|
|
|
2019-04-12 16:22:04 +01:00
|
|
|
buildInputs = [ sudo zsh pinentry ];
|
2019-03-20 09:06:23 +00:00
|
|
|
|
2017-06-05 11:02:03 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# if not, it shows .tomb-wrapped when running
|
|
|
|
substituteInPlace tomb \
|
|
|
|
--replace 'TOMBEXEC=$0' 'TOMBEXEC=tomb'
|
|
|
|
'';
|
2016-04-22 16:42:40 +01:00
|
|
|
|
2019-03-20 09:06:23 +00:00
|
|
|
doInstallCheck = true;
|
2019-04-12 16:22:04 +01:00
|
|
|
installCheckPhase = "$out/bin/tomb -h";
|
2016-04-22 16:42:40 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2017-06-05 11:02:03 +01:00
|
|
|
install -Dm755 tomb $out/bin/tomb
|
|
|
|
install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1
|
2016-04-22 16:42:40 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/tomb \
|
2019-03-20 09:06:23 +00:00
|
|
|
--prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext gnupg pinentry utillinux e2fsprogs ]}
|
2016-04-22 16:42:40 +01:00
|
|
|
'';
|
|
|
|
|
2017-06-05 11:02:03 +01:00
|
|
|
meta = with stdenv.lib; {
|
2016-04-22 16:42:40 +01:00
|
|
|
description = "File encryption on GNU/Linux";
|
2017-06-05 11:02:03 +01:00
|
|
|
homepage = https://www.dyne.org/software/tomb/;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
platforms = platforms.linux;
|
2016-04-22 16:42:40 +01:00
|
|
|
};
|
|
|
|
}
|