WIP
This commit is contained in:
parent
c645a8c767
commit
6fd417b925
@ -157,13 +157,14 @@ in rec {
|
||||
unset SOURCE_DATE_EPOCH
|
||||
|
||||
appimagetool ./isle.AppDir
|
||||
|
||||
mkdir -p "$out"/bin
|
||||
chmod +w "$out" -R
|
||||
mv Isle-* "$out"/bin/isle
|
||||
mv Isle-* "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
archPkg = ((import ./dist/linux/arch.nix) {
|
||||
inherit pkgs buildSystem releaseName appImage;
|
||||
});
|
||||
|
||||
tests = pkgs.writeScript "isle-tests" ''
|
||||
export PATH=${pkgs.lib.makeBinPath [
|
||||
appImage
|
||||
|
65
dist/linux/arch.nix
vendored
Normal file
65
dist/linux/arch.nix
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
pkgs,
|
||||
buildSystem,
|
||||
releaseName,
|
||||
appImage,
|
||||
}: let
|
||||
|
||||
cpuArch = (pkgs.lib.systems.parse.mkSystemFromString buildSystem).cpu.name;
|
||||
|
||||
pkgbuild = pkgs.writeText "isle-arch-PKGBUILD-${releaseName}-${cpuArch}" ''
|
||||
pkgname=isle
|
||||
pkgver=${releaseName}
|
||||
pkgrel=0
|
||||
pkgdesc="The Isle project provides the foundation for an autonomous community cloud infrastructure."
|
||||
arch=('${cpuArch}')
|
||||
url="https://code.betamike.com/micropelago/isle"
|
||||
license=('AGPLv3')
|
||||
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 = appImage;
|
||||
appDir = ../../AppDir;
|
||||
dontUnpack = true;
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p root/usr/bin/
|
||||
cp "$src" root/usr/bin/isle
|
||||
|
||||
mkdir -p root/etc/isle/
|
||||
cp "$appDir"/etc/daemon.yml root/etc/isle/daemon.yml
|
||||
|
||||
cp $pkgbuild PKGBUILD
|
||||
|
||||
tar -cf src.tar.zst --zstd --mode=a+rX,u+w -C root .
|
||||
ls -lh ./root/usr/bin
|
||||
|
||||
PKGEXT=".pkg.tar.zst" makepkg --config ${pkgs.pacman}/etc/makepkg.conf
|
||||
ls -lh ./
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp *.pkg.tar.zst $out/
|
||||
'';
|
||||
|
||||
fixupPhase = "";
|
||||
}
|
12
release.nix
12
release.nix
@ -16,15 +16,21 @@
|
||||
inherit buildSystem hostSystem releaseName revision;
|
||||
}).appImage;
|
||||
|
||||
archPkg = ((import ./dist/linux/arch.nix) {
|
||||
inherit pkgs buildSystem releaseName appImage;
|
||||
});
|
||||
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
name = "isle-release-${hostSystem}";
|
||||
inherit releaseName appImage hostSystem;
|
||||
inherit releaseName hostSystem;
|
||||
inherit appImage archPkg;
|
||||
|
||||
builder = builtins.toFile "build.sh" ''
|
||||
source $stdenv/setup
|
||||
|
||||
mkdir -p "$out"/
|
||||
cp "$appImage"/bin/isle "$out"/isle-$releaseName-$hostSystem
|
||||
cp "$appImage" "$out"/isle-$releaseName-$hostSystem.AppImage
|
||||
cp "$archPkg"/*.tar.zst "$out"/isle-$releaseName-$hostSystem.pkg.tar.zst
|
||||
'';
|
||||
};
|
||||
|
||||
@ -43,7 +49,7 @@ in
|
||||
|
||||
mkdir -p "$out"
|
||||
for p in $releases; do
|
||||
cp "$p"/isle-* "$out"/
|
||||
cp "$p"/* "$out"/
|
||||
done
|
||||
|
||||
(cd "$out" && sha256sum * > sha256.txt)
|
||||
|
Loading…
Reference in New Issue
Block a user