2019-02-23 15:56:49 +00:00
|
|
|
{ stdenv, fetchFromGitHub, git, makeWrapper, openssl, coreutils, utillinux, gnugrep, gnused, gawk }:
|
2015-10-25 18:26:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "transcrypt";
|
2018-05-30 22:11:42 +01:00
|
|
|
version = "1.1.0";
|
2015-10-25 18:26:08 +00:00
|
|
|
|
2016-09-06 16:14:52 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elasticdog";
|
|
|
|
repo = "transcrypt";
|
|
|
|
rev = "v${version}";
|
2018-05-30 22:11:42 +01:00
|
|
|
sha256 = "1dkr69plk16wllk5bzlkchrzw63pk239dgbjhrb3mb61i065jdam";
|
2015-10-25 18:26:08 +00:00
|
|
|
};
|
|
|
|
|
2019-02-23 15:56:49 +00:00
|
|
|
buildInputs = [ makeWrapper git openssl coreutils utillinux gnugrep gnused gawk ];
|
2015-10-25 18:26:08 +00:00
|
|
|
|
2019-02-23 18:31:53 +00:00
|
|
|
patches = [ ./helper-scripts_depspathprefix.patch ];
|
|
|
|
|
2015-10-25 18:26:08 +00:00
|
|
|
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
|
2016-09-06 16:14:52 +01:00
|
|
|
|
|
|
|
wrapProgram $out/bin/transcrypt \
|
2019-02-23 15:56:49 +00:00
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ git openssl coreutils utillinux gnugrep gnused gawk ]}"
|
2019-02-23 18:31:53 +00:00
|
|
|
|
|
|
|
cat > $out/bin/transcrypt-depspathprefix << EOF
|
|
|
|
#!${stdenv.shell}
|
|
|
|
echo "${stdenv.lib.makeBinPath [ git openssl coreutils gawk ]}:"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/transcrypt-depspathprefix
|
2015-10-25 18:26:08 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.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;
|
|
|
|
};
|
|
|
|
}
|