2022-04-27 09:35:20 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, git
|
|
|
|
, gnupg
|
|
|
|
, makeWrapper
|
|
|
|
, openssl
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "git-crypt";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AGWA";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-GcGCX6hoKL+sNLAeGEzZpaM+cdFjcNlwYExfOFEPi0I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ libxslt makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [ openssl ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace commands.cpp \
|
|
|
|
--replace '(escape_shell_arg(our_exe_path()))' '= "git-crypt"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"ENABLE_MAN=yes"
|
|
|
|
"DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl"
|
|
|
|
];
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
# https://github.com/AGWA/git-crypt/issues/232
|
|
|
|
CXXFLAGS = [
|
|
|
|
"-DOPENSSL_API_COMPAT=0x30000000L"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
wrapProgram $out/bin/git-crypt \
|
|
|
|
--suffix PATH : ${lib.makeBinPath [ git gnupg ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.agwa.name/projects/git-crypt";
|
|
|
|
description = "Transparent file encryption in git";
|
|
|
|
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";
|
|
|
|
license = licenses.gpl3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ dochang ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|