From 8195cd8227b62734ef632ebaa58305cf439075f3 Mon Sep 17 00:00:00 2001 From: SamLukeYes Date: Wed, 6 Mar 2024 00:39:26 +0800 Subject: [PATCH] pacman: 6.0.2 -> 6.1.0 --- .../package-management/pacman/default.nix | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/package-management/pacman/default.nix b/pkgs/tools/package-management/pacman/default.nix index 800e392f0f24..90252dca9cb2 100644 --- a/pkgs/tools/package-management/pacman/default.nix +++ b/pkgs/tools/package-management/pacman/default.nix @@ -1,7 +1,6 @@ { lib , stdenv -, fetchpatch -, fetchurl +, fetchFromGitLab , asciidoc , binutils , coreutils @@ -39,19 +38,23 @@ , sysHookDir ? "/usr/share/libalpm/hooks/" }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (final: { pname = "pacman"; - version = "6.0.2"; + version = "6.1.0"; - src = fetchurl { - url = "https://sources.archlinux.org/other/${pname}/${pname}-${version}.tar.xz"; - hash = "sha256-fY4+jFEhrsCWXfcfWb7fRgUsbPFPljZcRBHsPeCkwaU="; + src = fetchFromGitLab { + domain = "gitlab.archlinux.org"; + owner = "pacman"; + repo = "pacman"; + rev = "v${final.version}"; + hash = "sha256-uHBq1A//YSqFATlyqjC5ZgmvPkNKqp7sVew+nbmLH78="; }; strictDeps = true; nativeBuildInputs = [ asciidoc + gettext installShellFiles libarchive makeWrapper @@ -71,11 +74,6 @@ stdenv.mkDerivation rec { patches = [ ./dont-create-empty-dirs.patch - # Add keyringdir meson option to configure the keyring directory - (fetchpatch { - url = "https://gitlab.archlinux.org/pacman/pacman/-/commit/79bd512181af12ec80fd8f79486fc9508fa4a1b3.patch"; - hash = "sha256-ivTPwWe06Q5shn++R6EY0x3GC0P4X0SuC+F5sndfAtM="; - }) ]; postPatch = let compressionTools = [ @@ -93,16 +91,16 @@ stdenv.mkDerivation rec { 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(PREFIX, DATAROOTDIR, get_option('keyringdir'))" "'\$KEYRING_IMPORT_DIR'" \ + --replace "join_paths(SYSCONFDIR, 'makepkg.conf.d/')" "'$out/etc/makepkg.conf.d/'" substituteInPlace doc/meson.build \ --replace "/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 "--batch --check-trustdb" "--batch --check-trustdb --allow-weak-key-signatures" - ''; # the line above should be removed once Arch migrates to gnupg 2.3.x + --subst-var-by keyringdir '\$KEYRING_IMPORT_DIR' + ''; mesonFlags = [ "--sysconfdir=/etc" @@ -132,6 +130,7 @@ stdenv.mkDerivation rec { changelog = "https://gitlab.archlinux.org/pacman/pacman/-/raw/v${version}/NEWS"; license = licenses.gpl2Plus; platforms = platforms.linux; + mainProgram = "pacman"; maintainers = with maintainers; [ samlukeyes123 ]; }; -} +})