58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
revision ? "dev",
|
|
releaseName ? "dev",
|
|
|
|
buildSystem ? builtins.currentSystem,
|
|
pkgsNix ? (import ./nix/pkgs.nix),
|
|
supportedSystems ? pkgsNix.supportedSystems,
|
|
|
|
}: let
|
|
|
|
pkgs = pkgsNix.default { inherit buildSystem; };
|
|
|
|
mkRelease = hostSystem: let
|
|
|
|
appImage = ((import ./default.nix) {
|
|
inherit buildSystem hostSystem releaseName revision;
|
|
}).appImage;
|
|
|
|
archPkg = ((import ./dist/linux/arch) {
|
|
inherit pkgs buildSystem releaseName appImage;
|
|
});
|
|
|
|
in pkgs.stdenv.mkDerivation {
|
|
name = "isle-release-${hostSystem}";
|
|
inherit releaseName hostSystem;
|
|
inherit appImage archPkg;
|
|
|
|
builder = builtins.toFile "build.sh" ''
|
|
source $stdenv/setup
|
|
|
|
mkdir -p "$out"/
|
|
cp "$appImage" "$out"/isle-$releaseName-$hostSystem.AppImage
|
|
cp "$archPkg"/*.tar.zst "$out"/isle-$releaseName-$hostSystem.pkg.tar.zst
|
|
'';
|
|
};
|
|
|
|
releases = builtins.map mkRelease supportedSystems;
|
|
|
|
in
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
name = "isle-release-${releaseName}";
|
|
inherit releases;
|
|
|
|
nativeBuildInputs = [ pkgs.coreutils ];
|
|
|
|
builder = builtins.toFile "build.sh" ''
|
|
source $stdenv/setup
|
|
|
|
mkdir -p "$out"
|
|
for p in $releases; do
|
|
cp "$p"/* "$out"/
|
|
done
|
|
|
|
(cd "$out" && sha256sum * > sha256.txt)
|
|
'';
|
|
}
|