about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2020-05-21 16:05:42 -0400
committerGitHub <noreply@github.com>2020-05-21 16:05:42 -0400
commiteae4f22176789ce3b6a66bad773a45b12e895cdf (patch)
tree24439d933bb7e86ed1e1b433758c0fbf3967d825 /pkgs/development/tools
parentd87dec9f7712cd84266281d482462df809a22178 (diff)
parent7e9d807f2cfbf4645ac9dab97e895435c3f6fe7b (diff)
downloadnixlib-eae4f22176789ce3b6a66bad773a45b12e895cdf.tar
nixlib-eae4f22176789ce3b6a66bad773a45b12e895cdf.tar.gz
nixlib-eae4f22176789ce3b6a66bad773a45b12e895cdf.tar.bz2
nixlib-eae4f22176789ce3b6a66bad773a45b12e895cdf.tar.lz
nixlib-eae4f22176789ce3b6a66bad773a45b12e895cdf.tar.xz
nixlib-eae4f22176789ce3b6a66bad773a45b12e895cdf.tar.zst
nixlib-eae4f22176789ce3b6a66bad773a45b12e895cdf.zip
Merge pull request #88518 from Ericson2314/fix-pkg-config
pkg-config, pkgconf: Misc fixes
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/misc/pkg-config/default.nix7
-rw-r--r--pkgs/development/tools/misc/pkgconf/default.nix29
2 files changed, 33 insertions, 3 deletions
diff --git a/pkgs/development/tools/misc/pkg-config/default.nix b/pkgs/development/tools/misc/pkg-config/default.nix
index d5e766283ce6..84f6c330f8c5 100644
--- a/pkgs/development/tools/misc/pkg-config/default.nix
+++ b/pkgs/development/tools/misc/pkg-config/default.nix
@@ -11,13 +11,16 @@ stdenv.mkDerivation rec {
     sha256 = "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg";
   };
 
+  outputs = [ "out" "man" "doc" ];
+
   # Process Requires.private properly, see
-  # http://bugs.freedesktop.org/show_bug.cgi?id=4738.
+  # http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to
+  # https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/28
   patches = optional (!vanilla) ./requires-private.patch
     ++ optional stdenv.isCygwin ./2.36.3-not-win32.patch;
 
   # These three tests fail due to a (desired) behavior change from our ./requires-private.patch
-  postPatch = ''
+  postPatch = if vanilla then null else ''
     rm -f check/check-requires-private check/check-gtk check/missing
   '';
 
diff --git a/pkgs/development/tools/misc/pkgconf/default.nix b/pkgs/development/tools/misc/pkgconf/default.nix
index 02b7ff5fcd3d..fb8281ff98c4 100644
--- a/pkgs/development/tools/misc/pkgconf/default.nix
+++ b/pkgs/development/tools/misc/pkgconf/default.nix
@@ -1,14 +1,41 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, removeReferencesTo }:
 
 stdenv.mkDerivation rec {
   pname = "pkgconf";
   version = "1.6.3";
 
+  nativeBuildInputs = [ removeReferencesTo ];
+
+  outputs = [ "out" "lib" "dev" "man" "doc" ];
+
+  enableParallelBuilding = true;
+
   src = fetchurl {
     url = "https://distfiles.dereferenced.org/${pname}/${pname}-${version}.tar.xz";
     sha256 = "04525vv0y849vvc2pi60g5wd9fjp1wbhra2lniifi82y1ldv7w31";
   };
 
+  # Debian has outputs like these too:
+  # https://packages.debian.org/source/buster/pkgconf, so take it this
+  # reference removing is safe.
+  postFixup = ''
+    remove-references-to \
+      -t "${placeholder "dev"}" \
+      "${placeholder "lib"}"/lib/* \
+      "${placeholder "out"}"/bin/*
+    remove-references-to \
+      -t "${placeholder "out"}" \
+      "${placeholder "lib"}"/lib/*
+  ''
+  # Move back share/aclocal. Yes, this normally goes in the dev output for good
+  # reason, but in this case the dev output is for the `libpkgconf` library,
+  # while the aclocal stuff is for the tool. The tool is already for use during
+  # development, so there is no reason to have separate "dev-bin" and "dev-lib"
+  # outputs or someting.
+  + ''
+    mv ${placeholder "dev"}/share ${placeholder "out"}
+  '';
+
   meta = with stdenv.lib; {
     description = "Package compiler and linker metadata toolkit";
     homepage = "https://git.dereferenced.org/pkgconf/pkgconf";