2023-03-25 14:58:20 +00:00
|
|
|
{
|
2024-06-10 14:01:27 +00:00
|
|
|
revision ? "dev",
|
|
|
|
releaseName ? "dev",
|
2023-03-25 14:58:20 +00:00
|
|
|
|
|
|
|
buildSystem ? builtins.currentSystem,
|
|
|
|
pkgsNix ? (import ./nix/pkgs.nix),
|
|
|
|
supportedSystems ? pkgsNix.supportedSystems,
|
|
|
|
|
|
|
|
}: let
|
|
|
|
|
|
|
|
pkgs = pkgsNix.default { inherit buildSystem; };
|
|
|
|
|
|
|
|
mkRelease = hostSystem: let
|
|
|
|
|
|
|
|
appImage = ((import ./default.nix) {
|
2023-08-30 16:24:09 +00:00
|
|
|
inherit buildSystem hostSystem releaseName revision;
|
2023-03-25 14:58:20 +00:00
|
|
|
}).appImage;
|
|
|
|
|
2024-06-16 21:25:23 +00:00
|
|
|
archPkg = ((import ./dist/linux/arch) {
|
2024-07-14 13:26:34 +00:00
|
|
|
inherit pkgs buildSystem hostSystem releaseName appImage;
|
2024-06-16 21:25:23 +00:00
|
|
|
});
|
|
|
|
|
2023-03-25 14:58:20 +00:00
|
|
|
in pkgs.stdenv.mkDerivation {
|
2023-08-05 21:53:17 +00:00
|
|
|
name = "isle-release-${hostSystem}";
|
2024-06-16 21:25:23 +00:00
|
|
|
inherit releaseName hostSystem;
|
|
|
|
inherit appImage archPkg;
|
2023-03-25 14:58:20 +00:00
|
|
|
|
|
|
|
builder = builtins.toFile "build.sh" ''
|
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
mkdir -p "$out"/
|
2024-06-16 21:25:23 +00:00
|
|
|
cp "$appImage" "$out"/isle-$releaseName-$hostSystem.AppImage
|
|
|
|
cp "$archPkg"/*.tar.zst "$out"/isle-$releaseName-$hostSystem.pkg.tar.zst
|
2023-03-25 14:58:20 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
releases = builtins.map mkRelease supportedSystems;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
2023-08-05 21:53:17 +00:00
|
|
|
name = "isle-release-${releaseName}";
|
2023-03-25 14:58:20 +00:00
|
|
|
inherit releases;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgs.coreutils ];
|
|
|
|
|
|
|
|
builder = builtins.toFile "build.sh" ''
|
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
mkdir -p "$out"
|
|
|
|
for p in $releases; do
|
2024-06-16 21:25:23 +00:00
|
|
|
cp "$p"/* "$out"/
|
2023-03-25 14:58:20 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
(cd "$out" && sha256sum * > sha256.txt)
|
|
|
|
'';
|
|
|
|
}
|