From ed33e936164cfcf7981a062778eb12e1ed7484c3 Mon Sep 17 00:00:00 2001 From: rntpts Date: Thu, 8 Oct 2026 02:05:01 +0200 Subject: [PATCH] git-cliff: un-vendor libgit2, libz and zstd, enable __structuredAttrs --- pkgs/by-name/gi/git-cliff/package.nix | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gi/git-cliff/package.nix b/pkgs/by-name/gi/git-cliff/package.nix index 6b5c45d3a98a..826784a7a7fe 100644 --- a/pkgs/by-name/gi/git-cliff/package.nix +++ b/pkgs/by-name/gi/git-cliff/package.nix @@ -4,12 +4,18 @@ fetchFromGitHub, rustPlatform, installShellFiles, + pkg-config, + libgit2, + libz, + zstd, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "git-cliff"; version = "2.14.2"; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "orhun"; repo = "git-cliff"; @@ -19,10 +25,25 @@ rustPlatform.buildRustPackage (finalAttrs: { cargoHash = "sha256-yO8Ov2+cJky3JqePy2mnOd4AFEKJRuAirm/iozTwArU="; + env = { + LIBGIT2_NO_VENDOR = 1; + LIBZ_SYS_STATIC = 0; + ZSTD_SYS_USE_PKG_CONFIG = 1; + }; + # attempts to run the program on .git in src which is not deterministic doCheck = false; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + pkg-config + ]; + + buildInputs = [ + libgit2 + libz + zstd + ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' export OUT_DIR=$(mktemp -d)