19 # Compression tools in scripts/libmakepkg/util/compress.sh.in
30 # pacman-key runtime dependencies
36 # Tells pacman where to find ALPM hooks provided by packages.
37 # This path is very likely to be used in an Arch-like root.
38 , sysHookDir ? "/usr/share/libalpm/hooks/"
41 stdenv.mkDerivation (final: {
45 src = fetchFromGitLab {
46 domain = "gitlab.archlinux.org";
49 rev = "v${final.version}";
50 hash = "sha256-ejOBxN2HjV4dZwFA7zvPz3JUJa0xiJ/jZ+evEQYG1Mc=";
76 ./dont-create-empty-dirs.patch
79 postPatch = let compressionTools = [
90 echo 'export PATH=${lib.makeBinPath compressionTools}:$PATH' >> scripts/libmakepkg/util/compress.sh.in
91 substituteInPlace meson.build \
92 --replace-fail "install_dir : SYSCONFDIR" "install_dir : '$out/etc'" \
93 --replace-fail "join_paths(DATAROOTDIR, 'libalpm/hooks/')" "'${sysHookDir}'" \
94 --replace-fail "join_paths(SYSCONFDIR, 'makepkg.conf.d/')" "'$out/etc/makepkg.conf.d/'"
95 substituteInPlace doc/meson.build \
96 --replace-fail "/bin/true" "${coreutils}/bin/true"
97 substituteInPlace scripts/repo-add.sh.in \
98 --replace-fail bsdtar "${libarchive}/bin/bsdtar"
100 # Fix https://gitlab.archlinux.org/pacman/pacman/-/issues/171
101 substituteInPlace scripts/libmakepkg/source/git.sh.in \
102 --replace-warn "---mirror" "--mirror"
107 "--localstatedir=/var"
111 installShellCompletion --bash scripts/pacman --zsh scripts/_pacman
112 wrapProgram $out/bin/makepkg \
113 --prefix PATH : ${lib.makeBinPath [ binutils ]}
114 wrapProgram $out/bin/pacman-key \
115 --prefix PATH : ${lib.makeBinPath [
116 "${placeholder "out"}"
126 description = "Simple library-based package manager";
127 homepage = "https://archlinux.org/pacman/";
128 changelog = "https://gitlab.archlinux.org/pacman/pacman/-/raw/v${final.version}/NEWS";
129 license = licenses.gpl2Plus;
130 platforms = platforms.linux;
131 mainProgram = "pacman";
132 maintainers = with maintainers; [ samlukeyes123 ];