summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-09-04 14:21:44 +0200
committerGitHub <noreply@github.com>2022-09-04 14:21:44 +0200
commitfef4e0e81fd73018b8e7be4ae8a38b269e5050f9 (patch)
treea7b998315e06a789219ac6d4053eaea97300065f
parent9db376b786d15aaf6c1cafc9bf0d390410fc85ef (diff)
parent66fdc40068aca4776466e910283ae0aad256825b (diff)
Merge pull request #189678 from SamLukeYes/arch-install-scripts
-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;
};
}