Skip to content

Commit

Permalink
Create bundles without ZIP'ing them
Browse files Browse the repository at this point in the history
Because GitHub Actions apparently does it itself.
  • Loading branch information
polybluez committed Dec 20, 2024
1 parent e8813a3 commit 2910e96
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 31 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
legacyPackages.mingw = (import ./packages/mingw.nix).default {
inherit pkgs lib fpcPkgs d2dfPkgs;
gameAssetsPath = defaultAssetsPath;
mkZipBundle = bundles.mkZipBundle;
mkGameBundle = bundles.mkGameBundle;
};

legacyPackages.fpc-git = pkgs.fpc;
Expand Down
2 changes: 1 addition & 1 deletion game/bundle/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{callPackage}: {
mkZipBundle = callPackage ./mkZipBundle.nix;
mkGameBundle = callPackage ./mkGameBundle.nix;
mkAndroidApk = callPackage ./mkAndroidApk.nix;
}
27 changes: 1 addition & 26 deletions game/bundle/mkZipBundle.nix → game/bundle/mkGameBundle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,4 @@ let
'';
});
in
{
zip,
stdenv,
callPackage,
gameAssetsPath,
unknownPkgsAttrs,
isWindows,
...
}:
stdenv.mkDerivation (finalAttrs: {
version = "0.667-git";
pname = "d2df-game-bundle";
name = "${finalAttrs.pname}-${finalAttrs.version}";

dontStrip = true;
dontPatchELF = true;
dontBuild = true;

nativeBuildInputs = [zip];

src = callPackage gameBundle {inherit gameAssetsPath unknownPkgsAttrs isWindows;};

installPhase = ''
zip -r $out .
'';
})
gameBundle
6 changes: 3 additions & 3 deletions packages/mingw.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
lib,
fpcPkgs,
d2dfPkgs,
mkZipBundle,
mkGameBundle,
gameAssetsPath,
}: let
mingwPkgs = import ../cross/mingw {
Expand All @@ -13,7 +13,7 @@
};
byArchAdditional =
lib.mapAttrs (target: targetAttrs: let
doom2df-zip = mkZipBundle {
doom2df-bundle = mkGameBundle {
inherit gameAssetsPath;
unknownPkgsAttrs = {
sharedBundledLibraries = [targetAttrs.enet targetAttrs.SDL2 targetAttrs.fmodex];
Expand All @@ -22,7 +22,7 @@
isWindows = true;
};
in {
inherit doom2df-zip;
inherit doom2df-bundle;
})
mingwPkgs.byArch;
in
Expand Down

0 comments on commit 2910e96

Please sign in to comment.