[Backport staging-nixos-26.05] gram: 2.1.2 -> 2.2.0 (#534886)

This commit is contained in:
Niklas Korz 2026-06-26 05:49:49 +00:00 committed by GitHub
commit 0e8a48be6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 4 deletions

View file

@ -31,7 +31,7 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "gram";
version = "2.1.2";
version = "2.2.0";
outputs = [
"out"
@ -44,7 +44,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
owner = "GramEditor";
repo = "gram";
tag = finalAttrs.version;
hash = "sha256-7FzAvC/JMMIFcuTGkL2Ju644UAIsneOMhiDUFnQske4=";
hash = "sha256-w0uZ2qAc3Tt6QVRAX97LWW9aOs02fG1SEYCDhpUhinE=";
};
postPatch = ''
@ -54,7 +54,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
--replace-fail '$CARGO_ABOUT_VERSION' '${cargo-about.version}'
'';
cargoHash = "sha256-feESY8ALSG3xa906HBc4pOKGerQ1jF7VUxzvUcsZbrY=";
cargoHash = "sha256-+lmDbawAIRllC7LzGJ9qPMtHXPd5aMoul47YOA7nfXA=";
__structuredAttrs = true;
@ -71,7 +71,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
dontUseCmakeConfigure = true;
buildInputs = [
libgit2
(libgit2.override { withExperimentalSha256 = true; })
openssl
sqlite
zlib

View file

@ -17,6 +17,7 @@
gitstatus,
llhttp,
withGssapi ? false,
withExperimentalSha256 ? false,
krb5,
}:
@ -43,6 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
"-DUSE_HTTP_PARSER=llhttp"
"-DUSE_SSH=ON"
(lib.cmakeBool "USE_GSSAPI" withGssapi)
(lib.cmakeBool "EXPERIMENTAL_SHA256" withExperimentalSha256)
"-DBUILD_SHARED_LIBS=${if staticBuild then "OFF" else "ON"}"
]
++ lib.optionals stdenv.hostPlatform.isWindows [
@ -89,6 +91,13 @@ stdenv.mkDerivation (finalAttrs: {
)
'';
postInstall = lib.optionalString withExperimentalSha256 ''
# Downstream Rust bindings (git2-rs / git2-sys) expect experimental headers
# to be located at 'git2/experimental.h', but upstream libgit2 installs them
# into 'git2-experimental/' when EXPERIMENTAL_SHA256 is enabled.
ln -s git2-experimental $dev/include/git2
'';
passthru.tests = lib.mapAttrs (_: v: v.override { libgit2 = finalAttrs.finalPackage; }) {
inherit libgit2-glib;
inherit (python3Packages) pygit2;