about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-10-29 11:16:23 +0200
committerGitHub <noreply@github.com>2022-10-29 11:16:23 +0200
commit19f597b8cc2dd2ab41ae77a4ad607876007a7da8 (patch)
treec92a7ae5a03b532c54c050c30ee9c0db4c4b1532 /pkgs/tools
parentfdc3ca1458c1e1d30243dbe8a62ce973ca1f89a5 (diff)
parent6dcf688d5a214a99559f0e321841e58ccfc6be7e (diff)
Merge pull request #192896 from SamLukeYes/pacman
pacman: add missing PATHs
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/package-management/pacman/default.nix30
1 files changed, 24 insertions, 6 deletions
diff --git a/pkgs/tools/package-management/pacman/default.nix b/pkgs/tools/package-management/pacman/default.nix
index 44a90769477b4..dd83ed9e9ec38 100644
--- a/pkgs/tools/package-management/pacman/default.nix
+++ b/pkgs/tools/package-management/pacman/default.nix
@@ -4,7 +4,6 @@
 , fetchurl
 , asciidoc
 , binutils
-, bzip2
 , coreutils
 , curl
 , gnupg
@@ -17,9 +16,19 @@
 , openssl
 , perl
 , pkg-config
-, xz
 , zlib
 
+# Compression tools in scripts/libmakepkg/util/compress.sh.in
+, gzip
+, bzip2
+, xz
+, zstd
+, lrzip
+, lzop
+, ncompress
+, lz4
+, lzip
+
 # Tells pacman where to find ALPM hooks provided by packages.
 # This path is very likely to be used in an Arch-like root.
 , sysHookDir ? "/usr/share/libalpm/hooks/"
@@ -44,13 +53,11 @@ stdenv.mkDerivation rec {
   ];
 
   buildInputs = [
-    bzip2
     curl
     gpgme
     libarchive
     openssl
     perl
-    xz
     zlib
   ];
 
@@ -63,7 +70,18 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  postPatch = ''
+  postPatch = let compressionTools = [
+    gzip
+    bzip2
+    xz
+    zstd
+    lrzip
+    lzop
+    ncompress
+    lz4
+    lzip
+  ]; in ''
+    echo 'export PATH=${lib.makeBinPath compressionTools}:$PATH' >> scripts/libmakepkg/util/compress.sh.in
     substituteInPlace meson.build \
       --replace "install_dir : SYSCONFDIR" "install_dir : '$out/etc'" \
       --replace "join_paths(DATAROOTDIR, 'libalpm/hooks/')" "'${sysHookDir}'" \
@@ -88,7 +106,7 @@ stdenv.mkDerivation rec {
     wrapProgram $out/bin/makepkg \
       --prefix PATH : ${lib.makeBinPath [ binutils ]}
     wrapProgram $out/bin/pacman-key \
-      --prefix PATH : ${lib.makeBinPath [ gnupg ]}
+      --prefix PATH : ${lib.makeBinPath [ "${placeholder "out"}" gnupg ]}
   '';
 
   meta = with lib; {