2023-03-25 14:58:20 +00:00
|
|
|
{
|
|
|
|
releaseName,
|
2023-08-30 16:24:09 +00:00
|
|
|
revision,
|
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;
|
|
|
|
|
|
|
|
in pkgs.stdenv.mkDerivation {
|
2023-08-05 21:53:17 +00:00
|
|
|
name = "isle-release-${hostSystem}";
|
2023-03-25 14:58:20 +00:00
|
|
|
inherit releaseName appImage hostSystem;
|
|
|
|
|
|
|
|
builder = builtins.toFile "build.sh" ''
|
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
mkdir -p "$out"/
|
2023-08-05 21:53:17 +00:00
|
|
|
cp "$appImage"/bin/isle "$out"/isle-$releaseName-$hostSystem
|
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
|
2023-08-05 21:53:17 +00:00
|
|
|
cp "$p"/isle-* "$out"/
|
2023-03-25 14:58:20 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
(cd "$out" && sha256sum * > sha256.txt)
|
|
|
|
'';
|
|
|
|
}
|