Files
nixpkgs/pkgs/by-name/pi/pixman/package.nix
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

103 lines
2.2 KiB
Nix

{
lib,
stdenv,
fetchurl,
meson,
ninja,
pkg-config,
libpng,
glib, # just passthru
# for passthru.tests
cairo,
qemu,
scribus,
tigervnc,
wlroots_0_17,
wlroots_0_18,
xwayland,
gitUpdater,
testers,
__flattenIncludeHackHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pixman";
version = "0.46.4";
src = fetchurl {
urls = [
"mirror://xorg/individual/lib/pixman-${finalAttrs.version}.tar.gz"
"https://cairographics.org/releases/pixman-${finalAttrs.version}.tar.gz"
];
hash = "sha256-0JxE68O9W+5wIcefki/o+y+1f3Mg9V6X/5kU0jRqWRw=";
};
# Raise test timeout, 120s can be slightly exceeded on slower hardware
postPatch = ''
substituteInPlace test/meson.build \
--replace-fail 'timeout : 120' 'timeout : 240'
'';
separateDebugInfo = !stdenv.hostPlatform.isStatic;
nativeBuildInputs = [
meson
ninja
pkg-config
__flattenIncludeHackHook
];
buildInputs = [ libpng ];
# Default "enabled" value attempts to enable CPU features on all
# architectures and requires used to disable them:
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/88
mesonAutoFeatures = "auto";
# fix armv7 build
mesonFlags = lib.optionals stdenv.hostPlatform.isAarch32 [
"-Darm-simd=disabled"
"-Dneon=disabled"
];
preConfigure = ''
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/62
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 184 ? 184 : NIX_BUILD_CORES))
'';
enableParallelBuilding = true;
doCheck = !stdenv.hostPlatform.isDarwin;
passthru = {
tests = {
inherit
cairo
qemu
scribus
tigervnc
wlroots_0_17
wlroots_0_18
xwayland
;
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
updateScript = gitUpdater {
url = "https://gitlab.freedesktop.org/pixman/pixman.git";
rev-prefix = "pixman-";
};
};
meta = with lib; {
homepage = "https://pixman.org";
description = "Low-level library for pixel manipulation";
license = licenses.mit;
platforms = platforms.all;
pkgConfigModules = [ "pixman-1" ];
};
})