push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,181 @@
{
stdenv,
fetchurl,
nixosTests,
fixDarwinDylibNames,
meson,
ninja,
pkg-config,
gettext,
python3,
docutils,
gi-docgen,
glib,
libtiff,
libjpeg,
libpng,
gnome,
doCheck ? false,
makeWrapper,
lib,
testers,
buildPackages,
withIntrospection ?
lib.meta.availableOn stdenv.hostPlatform gobject-introspection
&& stdenv.hostPlatform.emulatorAvailable buildPackages,
gobject-introspection,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gdk-pixbuf";
version = "2.42.12";
outputs = [
"out"
"dev"
"man"
]
++ lib.optional withIntrospection "devdoc"
++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests";
src =
let
inherit (finalAttrs) pname version;
in
fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
hash = "sha256-uVBbNEW5p+SM7TR2DDvLc+lm3zrJTJWhSMtmmrdI48c=";
};
patches = [
# Move installed tests to a separate output
./installed-tests-path.patch
./static-deps.patch
];
# gdk-pixbuf-thumbnailer is not wrapped therefore strictDeps will work
strictDeps = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
python3
makeWrapper
glib
# for man pages
docutils
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
]
++ lib.optionals withIntrospection [
gi-docgen
gobject-introspection
];
propagatedBuildInputs = [
glib
libtiff
libjpeg
libpng
];
mesonFlags = [
"-Dgio_sniffing=false"
(lib.mesonBool "gtk_doc" withIntrospection)
(lib.mesonEnable "introspection" withIntrospection)
(lib.mesonEnable "others" true)
]
++ lib.optionals stdenv.hostPlatform.isStatic [
"-Dbuiltin_loaders=all"
];
postPatch = ''
chmod +x build-aux/* # patchShebangs only applies to executables
patchShebangs build-aux
substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests"
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
# it should be a build-time dep for build
# TODO: send upstream
substituteInPlace docs/meson.build \
--replace "dependency('gi-docgen'," "dependency('gi-docgen', native:true," \
--replace "'gi-docgen', req" "'gi-docgen', native:true, req"
# Remove 'ani' loader until proper fix for CVE-2022-48622
substituteInPlace meson.build --replace-fail "'ani'," ""
'';
postInstall = ''
# All except one utility seem to be only useful during building.
moveToOutput "bin" "$dev"
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# meson erroneously installs loaders with .dylib extension on Darwin.
# Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them.
for f in $out/${finalAttrs.passthru.moduleDir}/*.dylib; do
install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f
mv $f ''${f%.dylib}.so
done
''
+ lib.optionalString withIntrospection ''
# We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
${stdenv.hostPlatform.emulator buildPackages} $dev/bin/gdk-pixbuf-query-loaders --update-cache
'';
# The fixDarwinDylibNames hook doesn't patch binaries.
preFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
for f in $out/bin/* $dev/bin/*; do
install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f
done
'';
postFixup = lib.optionalString withIntrospection ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
# The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB).
inherit doCheck;
setupHook = ./setup-hook.sh;
separateDebugInfo = stdenv.hostPlatform.isLinux;
passthru = {
updateScript = gnome.updateScript {
packageName = finalAttrs.pname;
versionPolicy = "odd-unstable";
};
tests = {
installedTests = nixosTests.installed-tests.gdk-pixbuf;
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
# gdk_pixbuf_binarydir and gdk_pixbuf_moduledir variables from gdk-pixbuf-2.0.pc
binaryDir = "lib/gdk-pixbuf-2.0/2.10.0";
moduleDir = "${finalAttrs.passthru.binaryDir}/loaders";
};
meta = with lib; {
description = "Library for image loading and manipulation";
homepage = "https://gitlab.gnome.org/GNOME/gdk-pixbuf";
license = licenses.lgpl21Plus;
teams = [ teams.gnome ];
mainProgram = "gdk-pixbuf-thumbnailer";
pkgConfigModules = [ "gdk-pixbuf-2.0" ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,13 @@
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -85,8 +85,8 @@
'aero.gif',
]
-installed_test_bindir = join_paths(gdk_pixbuf_libexecdir, 'installed-tests', meson.project_name())
-installed_test_datadir = join_paths(gdk_pixbuf_datadir, 'installed-tests', meson.project_name())
+installed_test_bindir = join_paths('@installedtestsprefix@', 'libexec', 'installed-tests', meson.project_name())
+installed_test_datadir = join_paths('@installedtestsprefix@', 'share', 'installed-tests', meson.project_name())
install_data(test_data, install_dir: installed_test_bindir)
install_subdir('test-images', install_dir: installed_test_bindir)

View File

@@ -0,0 +1,17 @@
findGdkPixbufLoaders() {
# choose the longest loaders.cache
local loadersCache="$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
if [[ -f "$loadersCache" ]]; then
if [[ -f "${GDK_PIXBUF_MODULE_FILE-}" ]]; then
if (( "$(cat "$loadersCache" | wc -l)" > "$(cat "$GDK_PIXBUF_MODULE_FILE" | wc -l)" )); then
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
fi
else
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
fi
fi
}
addEnvHooks "$targetOffset" findGdkPixbufLoaders

View File

@@ -0,0 +1,31 @@
From 1b7cac1cbdb7078f575a3222be451a9bf1ac35ec Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Wed, 31 Jan 2024 15:33:02 +0100
Subject: [PATCH] build: add missing dependency to gdkpixbuf_dep
This should match the dependencies passed to the library() call that
creates gdkpixbuf. Otherwise, linking the gdkpixbuf_bin executables
will fail if -Ddefault_library=static, because static libraries don't
carry dependency information themselves.
---
Link: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/161
gdk-pixbuf/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index a11926eee..450484d68 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -269,7 +269,7 @@ endif
gdkpixbuf_dep = declare_dependency(
link_with: gdkpixbuf,
include_directories: root_inc,
- dependencies: gdk_pixbuf_deps,
+ dependencies: [ gdk_pixbuf_deps, included_loaders_deps ],
sources: [ gdkpixbuf_enum_h, built_girs ],
)
meson.override_dependency('gdk-pixbuf-2.0', gdkpixbuf_dep)
--
GitLab

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
ninja,
pkg-config,
docbook-xsl-nons,
docbook_xml_dtd_43,
gtk-doc,
gdk-pixbuf,
libX11,
}:
stdenv.mkDerivation rec {
pname = "gdk-pixbuf-xlib";
version = "2.40.2";
outputs = [
"out"
"dev"
"devdoc"
];
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "Archive";
repo = "gdk-pixbuf-xlib";
rev = version;
hash = "sha256-b4EUaYzg2NlBMU90dGQivOvkv9KKSzES/ymPqzrelu8=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
docbook-xsl-nons
docbook_xml_dtd_43
gtk-doc
];
propagatedBuildInputs = [
gdk-pixbuf
libX11
];
mesonFlags = [
"-Dgtk_doc=true"
];
meta = with lib; {
description = "Deprecated API for integrating GdkPixbuf with Xlib data types";
homepage = "https://gitlab.gnome.org/Archive/gdk-pixbuf-xlib";
maintainers = [ ];
license = licenses.lgpl21Plus;
platforms = platforms.unix;
};
}