2023-10-23 13:38:36 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2023-10-23 13:39:36 +00:00
|
|
|
, substituteAll
|
2023-10-23 13:38:36 +00:00
|
|
|
, makeWrapper
|
2023-10-23 13:39:36 +00:00
|
|
|
, getent
|
2023-10-23 13:38:36 +00:00
|
|
|
, gettext
|
|
|
|
, zsh
|
|
|
|
, pinentry
|
|
|
|
, cryptsetup
|
|
|
|
, gnupg
|
2023-10-23 13:39:36 +00:00
|
|
|
, libargon2
|
|
|
|
, lsof
|
2023-10-23 13:38:36 +00:00
|
|
|
, util-linux
|
|
|
|
, e2fsprogs
|
2023-10-23 13:39:36 +00:00
|
|
|
, nix-update-script
|
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";
|
2023-10-23 13:39:36 +00:00
|
|
|
version = "2.10";
|
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";
|
2023-10-23 13:39:36 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-lLxQJX0P6b6lbXEcrq45EsX9iKiayZ9XkhqgMfpN3/w=";
|
2016-04-22 15:42:40 +00:00
|
|
|
};
|
|
|
|
|
2023-10-23 13:39:36 +00:00
|
|
|
buildInputs = [ 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
|
|
|
|
|
|
|
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:39:36 +00:00
|
|
|
--prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup e2fsprogs getent gettext gnupg libargon2 lsof pinentry util-linux ]}
|
2016-04-22 15:42:40 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-18 00:55:08 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
};
|
|
|
|
|
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/";
|
2023-10-23 13:39:36 +00:00
|
|
|
changelog = "https://github.com/dyne/Tomb/blob/v${version}/ChangeLog.md";
|
2023-10-23 13:38:36 +00:00
|
|
|
license = licenses.gpl3;
|
2023-10-18 00:55:08 +00:00
|
|
|
mainProgram = "tomb";
|
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
|
|
|
};
|
|
|
|
}
|