···11-{ stdenv, fetchurl }:
11+{ stdenv, fetchurl, removeReferencesTo }:
2233stdenv.mkDerivation rec {
44 pname = "pkgconf";
55 version = "1.6.3";
66+77+ nativeBuildInputs = [ removeReferencesTo ];
88+99+ outputs = [ "out" "lib" "dev" "man" "doc" ];
1010+1111+ enableParallelBuilding = true;
612713 src = fetchurl {
814 url = "https://distfiles.dereferenced.org/${pname}/${pname}-${version}.tar.xz";
915 sha256 = "04525vv0y849vvc2pi60g5wd9fjp1wbhra2lniifi82y1ldv7w31";
1016 };
1717+1818+ # Debian has outputs like these too:
1919+ # https://packages.debian.org/source/buster/pkgconf, so take it this
2020+ # reference removing is safe.
2121+ postFixup = ''
2222+ remove-references-to \
2323+ -t "${placeholder "dev"}" \
2424+ "${placeholder "lib"}"/lib/* \
2525+ "${placeholder "out"}"/bin/*
2626+ remove-references-to \
2727+ -t "${placeholder "out"}" \
2828+ "${placeholder "lib"}"/lib/*
2929+ ''
3030+ # Move back share/aclocal. Yes, this normally goes in the dev output for good
3131+ # reason, but in this case the dev output is for the `libpkgconf` library,
3232+ # while the aclocal stuff is for the tool. The tool is already for use during
3333+ # development, so there is no reason to have separate "dev-bin" and "dev-lib"
3434+ # outputs or someting.
3535+ + ''
3636+ mv ${placeholder "dev"}/share ${placeholder "out"}
3737+ '';
11381239 meta = with stdenv.lib; {
1340 description = "Package compiler and linker metadata toolkit";