Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
94 lines
2.2 KiB
Nix
94 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
git,
|
|
makeWrapper,
|
|
openssl,
|
|
coreutils,
|
|
util-linux,
|
|
gnugrep,
|
|
gnused,
|
|
gawk,
|
|
testers,
|
|
transcrypt,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "transcrypt";
|
|
version = "2.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "elasticdog";
|
|
repo = "transcrypt";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-s95EnEmcdd5mFAKvtZ88aXxkrRLSZUP0VBrCy5PR4fo=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [
|
|
git
|
|
openssl
|
|
coreutils
|
|
util-linux
|
|
gnugrep
|
|
gnused
|
|
gawk
|
|
];
|
|
|
|
installPhase = ''
|
|
install -m 755 -D transcrypt $out/bin/transcrypt
|
|
install -m 644 -D man/transcrypt.1 $out/share/man/man1/transcrypt.1
|
|
install -m 644 -D contrib/bash/transcrypt $out/share/bash-completion/completions/transcrypt
|
|
install -m 644 -D contrib/zsh/_transcrypt $out/share/zsh/site-functions/_transcrypt
|
|
|
|
wrapProgram $out/bin/transcrypt \
|
|
--prefix PATH : "${
|
|
lib.makeBinPath [
|
|
git
|
|
openssl
|
|
coreutils
|
|
util-linux
|
|
gnugrep
|
|
gnused
|
|
gawk
|
|
]
|
|
}"
|
|
|
|
cat > $out/bin/transcrypt-depspathprefix << EOF
|
|
#!${stdenv.shell}
|
|
echo "${
|
|
lib.makeBinPath [
|
|
git
|
|
openssl
|
|
coreutils
|
|
gawk
|
|
]
|
|
}:"
|
|
EOF
|
|
chmod +x $out/bin/transcrypt-depspathprefix
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = transcrypt;
|
|
command = "transcrypt --version";
|
|
version = "transcrypt ${version}";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Transparently encrypt files within a Git repository";
|
|
longDescription = ''
|
|
A script to configure transparent encryption of sensitive files stored in
|
|
a Git repository. Files that you choose will be automatically encrypted
|
|
when you commit them, and automatically decrypted when you check them
|
|
out. The process will degrade gracefully, so even people without your
|
|
encryption password can safely commit changes to the repository's
|
|
non-encrypted files.
|
|
'';
|
|
homepage = "https://github.com/elasticdog/transcrypt";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.elasticdog ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|