@@ -0,0 +1,51 @@
1+{ stdenv, fetchFromGitHub, zip, love_0_7, makeWrapper, makeDesktopItem }:
2+
3+let
4+ pname = "nottetris2";
5+ version = "2.0";
6+
7+ desktopItem = makeDesktopItem {
8+ name = "nottetris2";
9+ exec = pname;
10+ comment = "It's like tetris, but it's not";
11+ desktopName = "nottetris2";
12+ genericName = "nottetris2";
13+ categories = "Game";
14+ };
15+
16+in
17+
18+stdenv.mkDerivation {
19+ inherit pname version;
20+
21+ src = fetchFromGitHub {
22+ owner = "Stabyourself";
23+ repo = pname;
24+ rev = "v${version}";
25+ sha256 = "17iabh6rr8jim70n96rbhif4xq02g2kppscm8l339yqx6mhb64hs";
26+ };
27+
28+ nativeBuildInputs = [ zip ];
29+ buildInputs = [ love_0_7 makeWrapper ];
30+
31+ phases = [ "unpackPhase" "installPhase" ];
32+
33+ installPhase =
34+ ''
35+ mkdir -p $out/bin $out/share/games/lovegames $out/share/applications
36+ zip -9 -r ${pname}.love ./*
37+ mv ${pname}.love $out/share/games/lovegames/${pname}.love
38+ makeWrapper ${love_0_7}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
39+ ln -s ${desktopItem}/share/applications/* $out/share/applications/
40+ chmod +x $out/bin/${pname}
41+ '';
42+
43+ meta = with stdenv.lib; {
44+ description = "It's like Tetris, but it's not";
45+ platforms = platforms.linux;
46+ license = licenses.wtfpl;
47+ maintainers = with maintainers; [ yorickvp ];
48+ downloadPage = "https://stabyourself.net/nottetris2/";
49+ };
50+
51+}