9 , electronAppName ? "Antimatter Dimensions"
13 # build doesn't provide app.js, only index.html as entry point.
14 # app.js is used to change the directory where data is stored
15 # instead of default Electron. This workaround will be removed
16 # when this file will be available in upstream repository.
17 dummyElectronApp = ./app.js;
20 pname = "antimatter-dimensions";
21 version = "0-unstable-2024-08-12";
22 src = fetchFromGitHub {
24 repo = "AntimatterDimensionsSourceCode";
25 rev = "af840eef45bb2120bff4dcebb9b11c181067f9a8";
26 hash = "sha256-qlgu/Sw3LMn/ZSXJFi0DW6vYAZyF2D3cCpKmXhID3s4=";
30 # build script calls git to get git hash, message and author
31 # since fetchFromGitHub doesn't provide this information
32 # and in order to keep determinism (#8567), create a dummy git
33 (writeScriptBin "git" ''
38 npmDepsHash = "sha256-aG+oysgitQvdFM0QyzJ3DBxsanBHYI+UPJPhj6bf00Q=";
39 npmFlags = [ "--legacy-peer-deps" ];
40 npmBuildScript = "build:release";
45 mkdir -p $out/share/antimatter-dimensions
46 cp -Tr dist $out/share/antimatter-dimensions
47 mkdir -p $out/share/icons/hicolor/256x256/apps
48 ln -rs $out/share/antimatter-dimensions/icon.png $out/share/icons/hicolor/256x256/apps/antimatter-dimensions.png
49 cp ${dummyElectronApp} $out/share/antimatter-dimensions/app.js
51 makeWrapper ${lib.getExe electron} $out/bin/antimatter-dimensions \
52 --add-flags $out/share/antimatter-dimensions/app.js \
53 --set ELECTRON_APP_NAME "${electronAppName}"
60 name = "antimatter-dimensions";
61 exec = "antimatter-dimensions";
62 icon = "antimatter-dimensions";
63 desktopName = electronAppName;
64 comment = meta.description;
65 categories = [ "Game" ];
70 passthru.updateScript = unstableGitUpdater {
71 hardcodeZeroVersion = true;
75 homepage = "https://github.com/IvarK/AntimatterDimensionsSourceCode";
76 description = "Idle incremental game with multiple prestige layers.";
77 license = lib.licenses.mit;
78 mainProgram = "antimatter-dimensions";
79 maintainers = with lib.maintainers; [ amozeo ];
80 inherit (electron.meta) platforms;