Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacman: add missing PATHs #192896

Merged
merged 2 commits into from
Oct 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions pkgs/tools/package-management/pacman/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
, fetchurl
, asciidoc
, binutils
, bzip2
, coreutils
, curl
, gnupg
Expand All @@ -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/"
Expand All @@ -44,13 +53,11 @@ stdenv.mkDerivation rec {
];

buildInputs = [
bzip2
curl
gpgme
libarchive
openssl
perl
xz
zlib
];

Expand All @@ -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}'" \
Expand All @@ -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; {
Expand Down