mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport staging-nixos-26.05] gram: 2.1.2 -> 2.2.0 (#534886)
This commit is contained in:
commit
0e8a48be6c
2 changed files with 13 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue