{ pkgs, hostSystem, releaseName, appDir, }: let cpuArch = (pkgs.lib.systems.parse.mkSystemFromString hostSystem).cpu.name; pkgbuild = pkgs.writeText "isle-arch-PKGBUILD-${releaseName}-${cpuArch}" '' pkgname=isle pkgver=${builtins.replaceStrings ["-"] ["_"] releaseName} pkgrel=0 pkgdesc="The foundation for an autonomous community cloud infrastructure." arch=('${cpuArch}') url="https://code.betamike.com/micropelago/isle" license=('AGPL-3.0-or-later') source=('src.tar.zst') md5sums=('SKIP') package() { cp -r etc "$pkgdir"/etc cp -r usr "$pkgdir"/usr } ''; in pkgs.stdenv.mkDerivation { name = "isle-arch-pkg-${releaseName}-${cpuArch}"; nativeBuildInputs = [ pkgs.zstd pkgs.pacman pkgs.fakeroot pkgs.libarchive ]; inherit pkgbuild; src = appDir; defaultDaemonYml = ../../../go/daemon/daecommon/daemon.yml; systemdService = ../isle.service; dontUnpack = true; buildPhase = '' cp -rL "$src" root chmod -R +w root mkdir -p root/etc/isle/ cp "$defaultDaemonYml" root/etc/isle/daemon.yml mkdir -p root/usr/lib/sysusers.d/ cat >root/usr/lib/sysusers.d/isle.conf <