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