···1+{ stdenv, fetchurl, removeReferencesTo }:
23stdenv.mkDerivation rec {
4 pname = "pkgconf";
5 version = "1.6.3";
6+7+ nativeBuildInputs = [ removeReferencesTo ];
8+9+ outputs = [ "out" "lib" "dev" "man" "doc" ];
10+11+ enableParallelBuilding = true;
1213 src = fetchurl {
14 url = "https://distfiles.dereferenced.org/${pname}/${pname}-${version}.tar.xz";
15 sha256 = "04525vv0y849vvc2pi60g5wd9fjp1wbhra2lniifi82y1ldv7w31";
16 };
17+18+ # Debian has outputs like these too:
19+ # https://packages.debian.org/source/buster/pkgconf, so take it this
20+ # reference removing is safe.
21+ postFixup = ''
22+ remove-references-to \
23+ -t "${placeholder "dev"}" \
24+ "${placeholder "lib"}"/lib/* \
25+ "${placeholder "out"}"/bin/*
26+ remove-references-to \
27+ -t "${placeholder "out"}" \
28+ "${placeholder "lib"}"/lib/*
29+ ''
30+ # Move back share/aclocal. Yes, this normally goes in the dev output for good
31+ # reason, but in this case the dev output is for the `libpkgconf` library,
32+ # while the aclocal stuff is for the tool. The tool is already for use during
33+ # development, so there is no reason to have separate "dev-bin" and "dev-lib"
34+ # outputs or someting.
35+ + ''
36+ mv ${placeholder "dev"}/share ${placeholder "out"}
37+ '';
3839 meta = with stdenv.lib; {
40 description = "Package compiler and linker metadata toolkit";