nixpkgs/pkgs/os-specific/linux/tomb/default.nix

62 lines
1.3 KiB
Nix
Raw Normal View History

2023-10-23 13:38:36 +00:00
{ stdenv
, lib
, fetchFromGitHub
, substituteAll
2023-10-23 13:38:36 +00:00
, makeWrapper
, getent
2023-10-23 13:38:36 +00:00
, gettext
, zsh
, pinentry
, cryptsetup
, gnupg
, libargon2
, lsof
2023-10-23 13:38:36 +00:00
, util-linux
, e2fsprogs
, nix-update-script
2019-03-20 09:06:23 +00:00
}:
2016-04-22 15:42:40 +00:00
stdenv.mkDerivation rec {
pname = "tomb";
version = "2.10";
2016-04-22 15:42:40 +00:00
src = fetchFromGitHub {
2023-10-23 13:38:36 +00:00
owner = "dyne";
repo = "Tomb";
rev = "refs/tags/v${version}";
hash = "sha256-lLxQJX0P6b6lbXEcrq45EsX9iKiayZ9XkhqgMfpN3/w=";
2016-04-22 15:42:40 +00:00
};
buildInputs = [ zsh pinentry ];
2019-03-20 09:06:23 +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
install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1
2016-04-22 15:42:40 +00:00
wrapProgram $out/bin/tomb \
--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 { };
};
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/";
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";
maintainers = with maintainers; [ peterhoeg ];
2023-10-23 13:38:36 +00:00
platforms = platforms.linux;
2016-04-22 15:42:40 +00:00
};
}