summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorJonas Heinrich2023-05-11 09:19:38 +0200
committerGitHub2023-05-11 09:19:38 +0200
commit89ba8a4ac1456900f6d450cd4e391c832896eff6 (patch)
treea70b3387b6078af5290c6711c59542d090839bcb /pkgs/games
parentada356c7f7699ef8534975e5f96bbd8de8192abe (diff)
parent34e04da7c2eef71a65719b95cbd01b7ac97093c5 (diff)
Merge pull request #230963 from Janik-Haag/wireworld
wireworld: init at unstable-2023-05-09
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/wireworld/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/games/wireworld/default.nix b/pkgs/games/wireworld/default.nix
new file mode 100644
index 000000000000..5528b52a280a
--- /dev/null
+++ b/pkgs/games/wireworld/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, zip
+, love
+, makeWrapper
+, makeDesktopItem
+, copyDesktopItems
+}:
+
+stdenv.mkDerivation rec {
+  pname = "wireworld";
+  version = "unstable-2023-05-09";
+
+  src = fetchFromGitLab {
+    owner = "blinry";
+    repo = pname;
+    rev = "03b82bf5d604d6d4ad3c07b224583de6c396fd17";
+    hash = "sha256-8BshnGLuA8lmG9g7FU349DWKP/fZvlvjrQBau/LSJ4E=";
+  };
+
+  nativeBuildInputs = [ makeWrapper copyDesktopItems zip ];
+
+  desktopItems = [
+    (makeDesktopItem {
+      name = "Wireworld";
+      exec = pname;
+      comment = "";
+      desktopName = "Wireworld";
+      genericName = "Wireworld";
+      categories = [ "Game" ];
+    })
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    zip -9 -r Wireworld.love ./*
+    install -Dm444 -t $out/share/games/lovegames/ Wireworld.love
+    makeWrapper ${love}/bin/love $out/bin/Wireworld \
+      --add-flags $out/share/games/lovegames/Wireworld.love
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Fascinating electronics logic puzzles, game where you'll learn how to build clocks, diodes, and logic gates";
+    license = with licenses; [
+      mit
+      ofl
+      blueOak100
+      cc-by-sa-30
+      cc-by-sa-40
+    ];
+    downloadPage = "https://ldjam.com/events/ludum-dare/53/wireworld";
+    maintainers = with lib.maintainers; [ janik ];
+  };
+
+}