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