20 # Compression tools in scripts/libmakepkg/util/compress.sh.in
31 # pacman-key runtime dependencies
37 # Tells pacman where to find ALPM hooks provided by packages.
38 # This path is very likely to be used in an Arch-like root.
39 sysHookDir ? "/usr/share/libalpm/hooks/",
42 stdenv.mkDerivation (final: {
46 src = fetchFromGitLab {
47 domain = "gitlab.archlinux.org";
50 rev = "v${final.version}";
51 hash = "sha256-ejOBxN2HjV4dZwFA7zvPz3JUJa0xiJ/jZ+evEQYG1Mc=";
77 ./dont-create-empty-dirs.patch
95 echo 'export PATH=${lib.makeBinPath compressionTools}:$PATH' >> scripts/libmakepkg/util/compress.sh.in
96 substituteInPlace meson.build \
97 --replace-fail "install_dir : SYSCONFDIR" "install_dir : '$out/etc'" \
98 --replace-fail "join_paths(DATAROOTDIR, 'libalpm/hooks/')" "'${sysHookDir}'" \
99 --replace-fail "join_paths(SYSCONFDIR, 'makepkg.conf.d/')" "'$out/etc/makepkg.conf.d/'"
100 substituteInPlace doc/meson.build \
101 --replace-fail "/bin/true" "${coreutils}/bin/true"
102 substituteInPlace scripts/repo-add.sh.in \
103 --replace-fail bsdtar "${libarchive}/bin/bsdtar"
105 # Fix https://gitlab.archlinux.org/pacman/pacman/-/issues/171
106 substituteInPlace scripts/libmakepkg/source/git.sh.in \
107 --replace-warn "---mirror" "--mirror"
112 "--localstatedir=/var"
116 installShellCompletion --bash scripts/pacman --zsh scripts/_pacman
117 wrapProgram $out/bin/makepkg \
118 --prefix PATH : ${lib.makeBinPath [ binutils ]}
119 wrapProgram $out/bin/pacman-key \
122 "${placeholder "out"}"
133 description = "Simple library-based package manager";
134 homepage = "https://archlinux.org/pacman/";
135 changelog = "https://gitlab.archlinux.org/pacman/pacman/-/raw/v${final.version}/NEWS";
136 license = licenses.gpl2Plus;
137 platforms = platforms.linux;
138 mainProgram = "pacman";
139 maintainers = with maintainers; [ samlukeyes123 ];