diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/os-specific/linux/tomb/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/os-specific/linux/tomb/default.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/os-specific/linux/tomb/default.nix b/infra/libkookie/nixpkgs/pkgs/os-specific/linux/tomb/default.nix new file mode 100644 index 000000000000..9a21aab9f256 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/os-specific/linux/tomb/default.nix @@ -0,0 +1,44 @@ +{ stdenv, lib, fetchFromGitHub, makeWrapper +, gettext, zsh, pinentry, cryptsetup, gnupg, util-linux, e2fsprogs, sudo +}: + +stdenv.mkDerivation rec { + pname = "tomb"; + version = "2.8"; + + src = fetchFromGitHub { + owner = "dyne"; + repo = "Tomb"; + rev = "v${version}"; + sha256 = "sha256-bmkUwj0FFq51MUPbNK7xsyyq4swjZcwFeMwOO3fXCzA="; + }; + + buildInputs = [ sudo zsh pinentry ]; + + nativeBuildInputs = [ makeWrapper ]; + + postPatch = '' + # if not, it shows .tomb-wrapped when running + substituteInPlace tomb \ + --replace 'TOMBEXEC=$0' 'TOMBEXEC=tomb' + ''; + + doInstallCheck = true; + installCheckPhase = "$out/bin/tomb -h"; + + installPhase = '' + install -Dm755 tomb $out/bin/tomb + install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1 + + wrapProgram $out/bin/tomb \ + --prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext gnupg pinentry util-linux e2fsprogs ]} + ''; + + meta = with stdenv.lib; { + description = "File encryption on GNU/Linux"; + homepage = "https://www.dyne.org/software/tomb/"; + license = licenses.gpl3; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.linux; + }; +} |