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