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
|
|
|
|
|
2024-11-03 14:23:43 +00:00
|
|
|
build = ((import ./default.nix) {
|
2023-08-30 16:24:09 +00:00
|
|
|
inherit buildSystem hostSystem releaseName revision;
|
2024-11-03 14:23:43 +00:00
|
|
|
}).build;
|
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;
|
2024-11-03 14:23:43 +00:00
|
|
|
|
|
|
|
appImage = build.appImage;
|
|
|
|
archPkg = build.archPkg;
|
2024-12-20 11:49:01 +00:00
|
|
|
debPkg = build.debPkg;
|
2023-03-25 14:58:20 +00:00
|
|
|
|
|
|
|
builder = builtins.toFile "build.sh" ''
|
|
|
|
source $stdenv/setup
|
|
|
|
|
|
|
|
mkdir -p "$out"/
|
2024-11-03 14:23:43 +00:00
|
|
|
cp "$appImage"/bin/isle "$out"/isle-$releaseName-$hostSystem.AppImage
|
2024-12-20 11:49:01 +00:00
|
|
|
cp "$archPkg"/* "$out"/
|
|
|
|
cp "$debPkg"/* "$out"/
|
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)
|
|
|
|
'';
|
|
|
|
}
|