2022-11-08 21:15:24 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, libpng
|
|
|
|
, glib /*just passthru*/
|
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, cairo
|
|
|
|
, qemu
|
|
|
|
, scribus
|
|
|
|
, tigervnc
|
|
|
|
, wlroots
|
|
|
|
, xwayland
|
|
|
|
}:
|
2013-01-31 21:50:30 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pixman";
|
2022-11-05 11:35:34 +01:00
|
|
|
version = "0.42.2";
|
2013-01-31 21:50:30 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-11-05 11:35:34 +01:00
|
|
|
urls = [
|
|
|
|
"mirror://xorg/individual/lib/${pname}-${version}.tar.gz"
|
|
|
|
"https://cairographics.org/releases/${pname}-${version}.tar.gz"
|
|
|
|
];
|
|
|
|
hash = "sha256-6hSA762i/ZSLx1Nm98NJ4cltMpfQmj/mJibjjiNKYl4=";
|
2013-01-31 21:50:30 +01:00
|
|
|
};
|
|
|
|
|
2021-11-11 13:50:20 +01:00
|
|
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
2021-09-13 10:59:29 +02:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2013-04-18 21:31:56 +02:00
|
|
|
|
2018-08-08 21:02:00 +02:00
|
|
|
buildInputs = [ libpng ];
|
2013-04-18 21:31:56 +02:00
|
|
|
|
2022-11-09 07:46:54 +01:00
|
|
|
configureFlags = lib.optional stdenv.isAarch32 "--disable-arm-iwmmxt"
|
|
|
|
# Disable until https://gitlab.freedesktop.org/pixman/pixman/-/issues/46 is resolved
|
|
|
|
++ lib.optional (stdenv.isAarch64 && !stdenv.cc.isGNU) "--disable-arm-a64-neon";
|
2013-01-31 21:50:30 +01:00
|
|
|
|
2022-07-20 08:55:01 +02:00
|
|
|
preConfigure = ''
|
|
|
|
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/62
|
|
|
|
export OMP_NUM_THREADS=$((NIX_BUILD_CORES > 184 ? 184 : NIX_BUILD_CORES))
|
|
|
|
'';
|
|
|
|
|
2015-09-22 18:44:16 +02:00
|
|
|
doCheck = true;
|
2015-03-25 04:54:05 +01:00
|
|
|
|
2015-09-22 18:44:16 +02:00
|
|
|
postInstall = glib.flattenInclude;
|
2015-08-16 18:27:40 +02:00
|
|
|
|
2022-11-08 21:15:24 +01:00
|
|
|
passthru.tests = {
|
|
|
|
inherit cairo qemu scribus tigervnc wlroots xwayland;
|
|
|
|
};
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://pixman.org";
|
2013-01-31 21:50:30 +01:00
|
|
|
description = "A low-level library for pixel manipulation";
|
2015-09-22 18:44:16 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
2013-01-31 21:50:30 +01:00
|
|
|
};
|
|
|
|
}
|