git.iko.soy/typeable/nixpkgs
on master help sign in
nottetris2: init at 2.0 (#87028)

Co-authored-by: Yorick <yorickvanpelt@gmail.com>

commit002d38783ab0b570b296dadd4ee1ecfad21a9367 authorSohalt <sohalt@sohalt.net> dateFri 22 May 2020, 20:40 (6 years ago) parentfb13a1f
2 files changed+53
pkgs/games/nottetris2/default.nix+51 pkgs/top-level/all-packages.nix+2
pkgs/games/nottetris2/default.nixnew file+51
@@ -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+}
pkgs/top-level/all-packages.nix+2
@@ -23758,6 +23758,8 @@ in
2375823758
2375923759 newtonwars = callPackage ../games/newtonwars { };
2376023760
23761+ nottetris2 = callPackage ../games/nottetris2 { };
23762+
2376123763 nudoku = callPackage ../games/nudoku { };
2376223764
2376323765 nxengine-evo = callPackage ../games/nxengine-evo { };