Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/development/libraries/cairo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 3 additions & 4 deletions pkgs/development/libraries/freetype/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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) ''
Expand Down
14 changes: 0 additions & 14 deletions pkgs/development/libraries/glib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 <glib/...>.
# 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.
Expand Down Expand Up @@ -306,7 +293,6 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};

inherit flattenInclude;
updateScript = gnome.updateScript {
packageName = "glib";
versionPolicy = "odd-unstable";
Expand Down
2 changes: 0 additions & 2 deletions pkgs/development/libraries/pixman/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down