diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index cdf994442d372..8ed46ae3efb50 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -87,7 +87,7 @@ in { # `-I' flags to be propagated. sed -i "$out/lib/pkgconfig/cairo.pc" \ -es'|^Cflags:\(.*\)$|Cflags: \1 -I${freetype.dev}/include/freetype2 -I${freetype.dev}/include|g' - '' + lib.optionalString stdenv.hostPlatform.isDarwin glib.flattenInclude; + ''; passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 814224a44fbe8..1586ce27e69f3 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -72,10 +72,9 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; - postInstall = glib.flattenInclude - # pkgsCross.mingwW64.pkg-config doesn't build - # makeWrapper doesn't cross-compile to windows #120726 - + '' + # pkgsCross.mingwW64.pkg-config doesn't build + # makeWrapper doesn't cross-compile to windows #120726 + postInstall = '' substituteInPlace $dev/bin/freetype-config \ --replace ${buildPackages.pkg-config} ${pkgsHostHost.pkg-config} '' + lib.optionalString (!stdenv.hostPlatform.isMinGW) '' diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index f44b6385b8f1f..eda23120af8c9 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -33,19 +33,6 @@ assert stdenv.hostPlatform.isLinux -> util-linuxMinimal != null; let - # Some packages don't get "Cflags" from pkg-config correctly - # and then fail to build when directly including like . - # This is intended to be run in postInstall of any package - # which has $out/include/ containing just some disjunct directories. - flattenInclude = '' - for dir in "''${!outputInclude}"/include/*; do - cp -r "$dir"/* "''${!outputInclude}/include/" - rm -r "$dir" - ln -s . "$dir" - done - ln -sr -t "''${!outputInclude}/include/" "''${!outputInclude}"/lib/*/include/* 2>/dev/null || true - ''; - gobject-introspection' = buildPackages.gobject-introspection.override { propagateFullGlib = false; # Avoid introducing cairo, which enables gobjectSupport by default. @@ -306,7 +293,6 @@ stdenv.mkDerivation (finalAttrs: { pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; }; - inherit flattenInclude; updateScript = gnome.updateScript { packageName = "glib"; versionPolicy = "odd-unstable"; diff --git a/pkgs/development/libraries/pixman/default.nix b/pkgs/development/libraries/pixman/default.nix index dbf742ab81f25..b5bdcec35e562 100644 --- a/pkgs/development/libraries/pixman/default.nix +++ b/pkgs/development/libraries/pixman/default.nix @@ -63,8 +63,6 @@ stdenv.mkDerivation (finalAttrs: { doCheck = !stdenv.hostPlatform.isDarwin; - postInstall = glib.flattenInclude; - passthru = { tests = { inherit cairo qemu scribus tigervnc wlroots_0_17 wlroots_0_18 xwayland;