summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamLukeYes <samlukeyes123@gmail.com>2022-09-04 19:56:43 +0800
committerSamLukeYes <samlukeyes123@gmail.com>2022-09-04 19:56:43 +0800
commit66fdc40068aca4776466e910283ae0aad256825b (patch)
tree2ac06202baea722e7d5f5562d5a6ee85a8c6dcc1
parent550c5b19477363907678915e9b9d4e8c2ed51eff (diff)
arch-install-scripts: 24 -> 26
-rw-r--r--pkgs/tools/misc/arch-install-scripts/default.nix36
1 files 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;
};
}