nip2: fix build with gcc 15; switch to fetchFromGithub (#517158)

This commit is contained in:
yaya
2026-05-07 18:47:20 +00:00
committed by GitHub
+27 -4
View File
@@ -1,7 +1,9 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
pkg-config,
glib,
libxml2,
@@ -20,18 +22,39 @@ stdenv.mkDerivation (finalAttrs: {
pname = "nip2";
version = "8.9.1";
src = fetchurl {
url = "https://github.com/libvips/nip2/releases/download/v${finalAttrs.version}/nip2-${finalAttrs.version}.tar.gz";
sha256 = "sha256-t14m6z+5lPqpiOjgdDbKwqSWXCyrCL7zlo6BeoZtds0=";
src = fetchFromGitHub {
owner = "libvips";
repo = "nip2";
tag = "v${finalAttrs.version}";
hash = "sha256-SemlINqrqzWa7/sU6KnWiDJW8FLSYVZnCDtJNE0wjhg=";
};
patches = [
(fetchpatch {
name = "do-not-redeclare-statfs.patch";
url = "https://github.com/libvips/nip2/commit/045268a78c40d7f546220504f971c728aebc00be.patch";
hash = "sha256-A17+/Vmjf0l1Jpl22VL11gj5m6oFB8DnvkH2EHiRTw8=";
})
(fetchpatch {
name = "declare-function-arguments-for-function-pointer.patch";
url = "https://github.com/libvips/nip2/commit/8c60c517b59f806da84d57cb1d083a213b811151.patch";
hash = "sha256-o5OHNSbUORGquhyCYCtGQTY74IfroByaa0UAXYsP484=";
})
];
nativeBuildInputs = [
autoreconfHook
bison
flex
pkg-config
makeWrapper
glib
];
preAutoreconf = ''
glib-gettextize --force --copy
'';
buildInputs = [
glib
libxml2