Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
2025-04-08 02:57:25 -04:00

81 lines
2.0 KiB
Nix

{
fetchFromGitHub,
git,
gnupg,
makeWrapper,
openssl,
lib,
stdenv,
libxslt,
docbook_xsl,
}:
stdenv.mkDerivation rec {
pname = "git-crypt";
version = "0.7.0";
src = fetchFromGitHub {
owner = "AGWA";
repo = "git-crypt";
rev = version;
sha256 = "sha256-GcGCX6hoKL+sNLAeGEzZpaM+cdFjcNlwYExfOFEPi0I=";
};
strictDeps = true;
nativeBuildInputs = [
libxslt
makeWrapper
];
buildInputs = [ openssl ];
postPatch = ''
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"
];
# https://github.com/AGWA/git-crypt/issues/232
CXXFLAGS = [
"-DOPENSSL_API_COMPAT=0x30000000L"
];
postFixup = ''
wrapProgram $out/bin/git-crypt \
--suffix PATH : ${
lib.makeBinPath [
git
gnupg
]
}
'';
meta = with lib; {
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;
maintainers = with maintainers; [ dochang ];
platforms = platforms.unix;
mainProgram = "git-crypt";
};
}