arch-install-scripts: 24 -> 26

This commit is contained in:
SamLukeYes 2022-09-04 19:56:43 +08:00
parent 550c5b1947
commit 66fdc40068

View File

@ -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;
};
}