2022-04-21 23:37:13 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, git
|
|
|
|
, gnupg
|
|
|
|
, makeWrapper
|
|
|
|
, openssl
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
2019-07-16 18:44:45 +00:00
|
|
|
}:
|
2015-08-07 17:15:39 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-17 01:57:45 +00:00
|
|
|
pname = "git-crypt";
|
2022-04-21 23:38:19 +00:00
|
|
|
version = "0.7.0";
|
2015-08-07 17:15:39 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AGWA";
|
2019-07-17 01:57:45 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-21 23:38:19 +00:00
|
|
|
sha256 = "sha256-GcGCX6hoKL+sNLAeGEzZpaM+cdFjcNlwYExfOFEPi0I=";
|
2015-08-07 17:15:39 +00:00
|
|
|
};
|
|
|
|
|
2022-04-21 23:37:13 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ libxslt makeWrapper ];
|
2019-07-16 18:44:45 +00:00
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
buildInputs = [ openssl ];
|
2015-08-07 17:15:39 +00:00
|
|
|
|
2022-04-21 23:37:13 +00:00
|
|
|
postPatch = ''
|
2017-10-02 21:39:08 +00:00
|
|
|
substituteInPlace commands.cpp \
|
|
|
|
--replace '(escape_shell_arg(our_exe_path()))' '= "git-crypt"'
|
|
|
|
'';
|
|
|
|
|
2019-07-16 18:44:45 +00:00
|
|
|
makeFlags = [
|
2019-09-03 16:38:57 +00:00
|
|
|
"PREFIX=${placeholder "out"}"
|
2019-07-16 18:44:45 +00:00
|
|
|
"ENABLE_MAN=yes"
|
|
|
|
"DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl"
|
|
|
|
];
|
|
|
|
|
2022-07-31 21:45:34 +00:00
|
|
|
# https://github.com/AGWA/git-crypt/issues/232
|
|
|
|
CXXFLAGS = [
|
|
|
|
"-DOPENSSL_API_COMPAT=0x30000000L"
|
|
|
|
];
|
|
|
|
|
2019-07-16 18:44:45 +00:00
|
|
|
postFixup = ''
|
2022-04-21 23:37:13 +00:00
|
|
|
wrapProgram $out/bin/git-crypt \
|
|
|
|
--suffix PATH : ${lib.makeBinPath [ git gnupg ]}
|
2015-08-07 17:15:39 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.agwa.name/projects/git-crypt";
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "Transparent file encryption in git";
|
2015-08-07 17:15:39 +00:00
|
|
|
longDescription = ''
|
|
|
|
git-crypt enables transparent encryption and decryption of files in a git
|
|
|
|
repository. Files which you choose to protect are encrypted when
|
|
|
|
committed, and decrypted when checked out. git-crypt lets you freely
|
|
|
|
share a repository containing a mix of public and private
|
|
|
|
content. git-crypt gracefully degrades, so developers without the secret
|
|
|
|
key can still clone and commit to a repository with encrypted files. This
|
|
|
|
lets you store your secret material (such as keys or passwords) in the
|
|
|
|
same repository as your code, without requiring you to lock down your
|
|
|
|
entire repository.
|
|
|
|
'';
|
|
|
|
downloadPage = "https://github.com/AGWA/git-crypt/releases";
|
2015-10-14 12:38:30 +00:00
|
|
|
license = licenses.gpl3;
|
2023-07-23 17:30:22 +00:00
|
|
|
maintainers = with maintainers; [ dochang ];
|
2016-09-21 12:34:56 +00:00
|
|
|
platforms = platforms.unix;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "git-crypt";
|
2015-08-07 17:15:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|