about summary refs log tree commit diff
path: root/pkgs/games/nottetris2/default.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-05-23 10:24:52 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-05-23 10:24:52 +0200
commitb34551384a0b96ee59ddf5b9290da59ad8987473 (patch)
tree4b4389ee28fa029543c6fa61e87da9194fcea28d /pkgs/games/nottetris2/default.nix
parent5c2b59d63afe75d6735790ca9232a1445091bf53 (diff)
parentf7a398c481306f007dfaa050a6f597c0bf37a2ac (diff)
downloadnixlib-b34551384a0b96ee59ddf5b9290da59ad8987473.tar
nixlib-b34551384a0b96ee59ddf5b9290da59ad8987473.tar.gz
nixlib-b34551384a0b96ee59ddf5b9290da59ad8987473.tar.bz2
nixlib-b34551384a0b96ee59ddf5b9290da59ad8987473.tar.lz
nixlib-b34551384a0b96ee59ddf5b9290da59ad8987473.tar.xz
nixlib-b34551384a0b96ee59ddf5b9290da59ad8987473.tar.zst
nixlib-b34551384a0b96ee59ddf5b9290da59ad8987473.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/games/nottetris2/default.nix')
-rw-r--r--pkgs/games/nottetris2/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/games/nottetris2/default.nix b/pkgs/games/nottetris2/default.nix
new file mode 100644
index 000000000000..dde35e4fe320
--- /dev/null
+++ b/pkgs/games/nottetris2/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub, zip, love_0_7, makeWrapper, makeDesktopItem }:
+
+let
+  pname = "nottetris2";
+  version = "2.0";
+
+  desktopItem = makeDesktopItem {
+    name = "nottetris2";
+    exec = pname;
+    comment = "It's like tetris, but it's not";
+    desktopName = "nottetris2";
+    genericName = "nottetris2";
+    categories = "Game";
+  };
+
+in
+
+stdenv.mkDerivation {
+  inherit pname version;
+
+  src = fetchFromGitHub {
+    owner = "Stabyourself";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "17iabh6rr8jim70n96rbhif4xq02g2kppscm8l339yqx6mhb64hs";
+  };
+
+  nativeBuildInputs = [ zip ];
+  buildInputs = [ love_0_7 makeWrapper ];
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase =
+  ''
+    mkdir -p $out/bin $out/share/games/lovegames $out/share/applications
+    zip -9 -r ${pname}.love ./*
+    mv ${pname}.love $out/share/games/lovegames/${pname}.love
+    makeWrapper ${love_0_7}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
+    ln -s ${desktopItem}/share/applications/* $out/share/applications/
+    chmod +x $out/bin/${pname}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "It's like Tetris, but it's not";
+    platforms = platforms.linux;
+    license = licenses.wtfpl;
+    maintainers = with maintainers; [ yorickvp ];
+    downloadPage = "https://stabyourself.net/nottetris2/";
+  };
+
+}