Fix arch package cross-compiling

This commit is contained in:
Brian Picciano 2024-07-14 15:26:34 +02:00
parent 5de93e3711
commit 691727fe99
2 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,12 @@
{ {
pkgs, pkgs,
buildSystem, buildSystem,
hostSystem,
releaseName, releaseName,
appImage, appImage,
}: let }: let
cpuArch = (pkgs.lib.systems.parse.mkSystemFromString buildSystem).cpu.name; cpuArch = (pkgs.lib.systems.parse.mkSystemFromString hostSystem).cpu.name;
pkgbuild = pkgs.writeText "isle-arch-PKGBUILD-${releaseName}-${cpuArch}" '' pkgbuild = pkgs.writeText "isle-arch-PKGBUILD-${releaseName}-${cpuArch}" ''
pkgname=isle pkgname=isle
@ -71,7 +72,7 @@ in
tar -cf src.tar.zst --zstd --mode=a+rX,u+w -C root . tar -cf src.tar.zst --zstd --mode=a+rX,u+w -C root .
cp "$src" isle cp "$src" isle
PKGEXT=".pkg.tar.zst" makepkg \ PKGEXT=".pkg.tar.zst" CARCH="${cpuArch}" makepkg \
--nodeps \ --nodeps \
--config ${pkgs.pacman}/etc/makepkg.conf --config ${pkgs.pacman}/etc/makepkg.conf
''; '';

View File

@ -17,7 +17,7 @@
}).appImage; }).appImage;
archPkg = ((import ./dist/linux/arch) { archPkg = ((import ./dist/linux/arch) {
inherit pkgs buildSystem releaseName appImage; inherit pkgs buildSystem hostSystem releaseName appImage;
}); });
in pkgs.stdenv.mkDerivation { in pkgs.stdenv.mkDerivation {