From 66fdc40068aca4776466e910283ae0aad256825b Mon Sep 17 00:00:00 2001 From: SamLukeYes Date: Sun, 4 Sep 2022 19:56:43 +0800 Subject: arch-install-scripts: 24 -> 26 --- pkgs/tools/misc/arch-install-scripts/default.nix | 36 +++++++++++++++--------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/misc/arch-install-scripts/default.nix b/pkgs/tools/misc/arch-install-scripts/default.nix index c89e575e8eb0..ae447896eb6c 100644 --- a/pkgs/tools/misc/arch-install-scripts/default.nix +++ b/pkgs/tools/misc/arch-install-scripts/default.nix @@ -5,30 +5,42 @@ , bash , coreutils , gawk +, gnugrep , gnum4 +, makeWrapper +, pacman , util-linux +, chrootPath ? [ + "/usr/local/sbin" + "/usr/local/bin" + "/usr/bin" + "/usr/bin/site_perl" + "/usr/bin/vendor_perl" + "/usr/bin/core_perl" + ] }: resholve.mkDerivation rec { pname = "arch-install-scripts"; - version = "24"; + version = "26"; src = fetchFromGitHub { owner = "archlinux"; repo = "arch-install-scripts"; rev = "v${version}"; - sha256 = "06rydiliis34lbz5fsayhbczs1xqi1a80jnhxafpjf6k3rfji6iq"; + hash = "sha256-TRo1ANKSt3njw4HdBMUymMJDpTkL/i5/hdSqxHZnuYw="; }; nativeBuildInputs = [ asciidoc gnum4 ]; - preBuild = '' + postPatch = '' substituteInPlace ./Makefile \ --replace "PREFIX = /usr/local" "PREFIX ?= /usr/local" - - # https://github.com/archlinux/arch-install-scripts/pull/10 - substituteInPlace ./common \ - --replace "print '%s' \"\$1\"" "printf '%s' \"\$1\"" + substituteInPlace ./pacstrap.in \ + --replace "cp -a" "cp -LR --no-preserve=mode" \ + --replace "unshare pacman" "unshare ${pacman}/bin/pacman" \ + --replace 'gnupg "$newroot/etc/pacman.d/"' 'gnupg "$newroot/etc/pacman.d/" && chmod 700 "$newroot/etc/pacman.d/gnupg"' + echo "export PATH=${lib.strings.makeSearchPath "" chrootPath}:\$PATH" >> ./common ''; installFlags = [ "PREFIX=$(out)" ]; @@ -50,7 +62,7 @@ resholve.mkDerivation rec { interpreter = "${bash}/bin/bash"; # packages resholve should resolve executables from - inputs = [ coreutils gawk util-linux ]; + inputs = [ coreutils gawk gnugrep pacman util-linux ]; # TODO: no good way to resolve mount/umount in Nix builds for now # see https://github.com/abathur/resholve/issues/29 @@ -58,11 +70,7 @@ resholve.mkDerivation rec { external = [ "mount" "umount" ]; }; - # TODO: remove the execer lore override below after - # https://github.com/abathur/binlore/issues/1 - execer = [ - "cannot:${util-linux}/bin/unshare" - ]; + keep = [ "$setup" "$pid_unshare" "$mount_unshare" "${pacman}/bin/pacman" ]; }; }; @@ -73,7 +81,7 @@ resholve.mkDerivation rec { ''; homepage = "https://github.com/archlinux/arch-install-scripts"; license = licenses.gpl2Only; - maintainers = with maintainers; [ yayayayaka ]; + maintainers = with maintainers; [ samlukeyes123 ]; platforms = platforms.linux; }; } -- cgit v1.2.3