1{ lib
2, stdenv
3, fetchurl
4, removeReferencesTo
5}:
6
7stdenv.mkDerivation (finalAttrs: {
8 pname = "pkgconf";
9 version = "2.0.3";
10
11 src = fetchurl {
12 url = "https://distfiles.dereferenced.org/pkgconf/pkgconf-${finalAttrs.version}.tar.xz";
13 hash = "sha256-yr3zxHRSmFT3zM6Fc8WsaK00p+YhA3U1y8OYH2sjg2w=";
14 };
15
16 outputs = [ "out" "lib" "dev" "man" "doc" ];
17
18 nativeBuildInputs = [ removeReferencesTo ];
19
20 enableParallelBuilding = true;
21
22 # Debian has outputs like these too
23 # (https://packages.debian.org/source/bullseye/pkgconf), so it is safe to
24 # remove those references
25 postFixup = ''
26 remove-references-to \
27 -t "${placeholder "out"}" \
28 "${placeholder "lib"}"/lib/*
29 remove-references-to \
30 -t "${placeholder "dev"}" \
31 "${placeholder "lib"}"/lib/* \
32 "${placeholder "out"}"/bin/*
33 ''
34 # Move back share/aclocal. Yes, this normally goes in the dev output for good
35 # reason, but in this case the dev output is for the `libpkgconf` library,
36 # while the aclocal stuff is for the tool. The tool is already for use during
37 # development, so there is no reason to have separate "dev-bin" and "dev-lib"
38 # outputs or something.
39 + ''
40 mv ${placeholder "dev"}/share ${placeholder "out"}
41 '';
42
43 meta = {
44 homepage = "https://github.com/pkgconf/pkgconf";
45 description = "Package compiler and linker metadata toolkit";
46 longDescription = ''
47 pkgconf is a program which helps to configure compiler and linker flags
48 for development libraries. It is similar to pkg-config from
49 freedesktop.org.
50
51 libpkgconf is a library which provides access to most of pkgconf's
52 functionality, to allow other tooling such as compilers and IDEs to
53 discover and use libraries configured by pkgconf.
54 '';
55 changelog = "https://github.com/pkgconf/pkgconf/blob/pkgconf-${finalAttrs.version}/NEWS";
56 license = lib.licenses.isc;
57 mainProgram = "pkgconf";
58 maintainers = with lib.maintainers; [ zaninime AndersonTorres ];
59 platforms = lib.platforms.all;
60 };
61})