about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix b/nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix
new file mode 100644
index 000000000000..2c55a6f03a7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/misc/pkgconf/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, removeReferencesTo }:
+
+stdenv.mkDerivation rec {
+  pname = "pkgconf";
+  version = "1.7.4";
+
+  nativeBuildInputs = [ removeReferencesTo ];
+
+  outputs = [ "out" "lib" "dev" "man" "doc" ];
+
+  enableParallelBuilding = true;
+
+  src = fetchurl {
+    url = "https://distfiles.dereferenced.org/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-1z8ywkikWRE5prF3d8gNTeq2tBTsKz0h0KJL40jEdqs=";
+  };
+
+  # Debian has outputs like these too:
+  # https://packages.debian.org/source/buster/pkgconf, so take it this
+  # reference removing is safe.
+  postFixup = ''
+    remove-references-to \
+      -t "${placeholder "dev"}" \
+      "${placeholder "lib"}"/lib/* \
+      "${placeholder "out"}"/bin/*
+    remove-references-to \
+      -t "${placeholder "out"}" \
+      "${placeholder "lib"}"/lib/*
+  ''
+  # Move back share/aclocal. Yes, this normally goes in the dev output for good
+  # reason, but in this case the dev output is for the `libpkgconf` library,
+  # while the aclocal stuff is for the tool. The tool is already for use during
+  # development, so there is no reason to have separate "dev-bin" and "dev-lib"
+  # outputs or someting.
+  + ''
+    mv ${placeholder "dev"}/share ${placeholder "out"}
+  '';
+
+  meta = with lib; {
+    description = "Package compiler and linker metadata toolkit";
+    homepage = "https://git.dereferenced.org/pkgconf/pkgconf";
+    platforms = platforms.all;
+    license = licenses.isc;
+    maintainers = with maintainers; [ zaninime ];
+  };
+}