Unverified Commit cf121607 authored by rewine's avatar rewine Committed by GitHub
Browse files

pacman: fix scripts (#335433)

parents 030f73d6 8479c602
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -89,17 +89,17 @@ stdenv.mkDerivation (final: {
  ]; 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}'" \
      --replace "join_paths(PREFIX, DATAROOTDIR, get_option('keyringdir'))" "'\$KEYRING_IMPORT_DIR'" \
      --replace "join_paths(SYSCONFDIR, 'makepkg.conf.d/')" "'$out/etc/makepkg.conf.d/'"
      --replace-fail "install_dir : SYSCONFDIR" "install_dir : '$out/etc'" \
      --replace-fail "join_paths(DATAROOTDIR, 'libalpm/hooks/')" "'${sysHookDir}'" \
      --replace-fail "join_paths(SYSCONFDIR, 'makepkg.conf.d/')" "'$out/etc/makepkg.conf.d/'"
    substituteInPlace doc/meson.build \
      --replace "/bin/true" "${coreutils}/bin/true"
      --replace-fail "/bin/true" "${coreutils}/bin/true"
    substituteInPlace scripts/repo-add.sh.in \
      --replace bsdtar "${libarchive}/bin/bsdtar"
    substituteInPlace scripts/pacman-key.sh.in \
      --replace "local KEYRING_IMPORT_DIR='@keyringdir@'" "" \
      --subst-var-by keyringdir '\$KEYRING_IMPORT_DIR'
      --replace-fail bsdtar "${libarchive}/bin/bsdtar"

    # Fix https://gitlab.archlinux.org/pacman/pacman/-/issues/171
    substituteInPlace scripts/libmakepkg/source/git.sh.in \
      --replace-warn "---mirror" "--mirror"
  '';

  mesonFlags = [