summaryrefslogtreecommitdiffstats
path: root/home-configuration/managed/mindustry/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home-configuration/managed/mindustry/default.nix')
-rw-r--r--home-configuration/managed/mindustry/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/home-configuration/managed/mindustry/default.nix b/home-configuration/managed/mindustry/default.nix
new file mode 100644
index 0000000..929bca7
--- /dev/null
+++ b/home-configuration/managed/mindustry/default.nix
@@ -0,0 +1,25 @@
+{ pkgs, ... }:
+let
+ version = "159.7";
+ src = pkgs.fetchurl {
+ url = "https://github.com/Anuken/Mindustry/releases/download/v${version}/Mindustry.jar";
+ hash = "sha256:67b2e5c7575e564b184ed11e139c01ddc140afd28b238715e7d42e81612fdfbe";
+ };
+ icon = pkgs.fetchurl {
+ url = "https://upload.wikimedia.org/wikipedia/commons/4/4a/Mindustry_Icon.png";
+ hash = "sha256:1s597ywczx5c92dnqkij6drzkpn92613fqqsc1imw7dbhf07xjml";
+ };
+ mindustry = pkgs.writeShellScriptBin "mindustry" ''
+ export LD_LIBRARY_PATH=${pkgs.libglvnd}/lib:$LD_LIBRARY_PATH
+ exec ${pkgs.jdk17}/bin/java -jar ${src} "$@"
+ '';
+in
+{
+ home.packages = [ mindustry ];
+ home.file.".local/share/icons/hicolor/scalable/apps/mindustry.png".source = icon;
+ xdg.desktopEntries.mindustry.comment = "Sandbox tower defense with factory automation";
+ xdg.desktopEntries.mindustry.name = "Mindustry";
+ xdg.desktopEntries.mindustry.genericName = "Tower defense game";
+ xdg.desktopEntries.mindustry.exec = "mindustry";
+ xdg.desktopEntries.mindustry.icon = "mindustry";
+}