diff --git a/pkgs/games/gnujump/default.nix b/pkgs/games/gnujump/default.nix index 240481b7bba0..6f91b1034581 100644 --- a/pkgs/games/gnujump/default.nix +++ b/pkgs/games/gnujump/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, SDL, SDL_image, SDL_mixer }: +{ lib, stdenv, makeDesktopItem, copyDesktopItems, fetchurl, SDL, SDL_image, SDL_mixer }: stdenv.mkDerivation rec { pname = "gnujump"; @@ -7,10 +7,25 @@ stdenv.mkDerivation rec { url = "mirror://gnu/gnujump/${pname}-${version}.tar.gz"; sha256 = "05syy9mzbyqcfnm0hrswlmhwlwx54f0l6zhcaq8c1c0f8dgzxhqk"; }; + + nativeBuildInputs = [ copyDesktopItems ]; buildInputs = [ SDL SDL_image SDL_mixer ]; NIX_LDFLAGS = "-lm"; + desktopItems = [ (makeDesktopItem { + name = "gnujump"; + exec = "gnujump"; + icon = "gnujump"; + desktopName = "GNUjump"; + comment = "Jump up the tower to survive"; + categories = "Game;ArcadeGame;"; + }) ]; + + postInstall = '' + install -Dm644 ${./gnujump.xpm} $out/share/pixmaps/gnujump.xpm + ''; + meta = with lib; { homepage = "https://jump.gnu.sinusoid.es/index.php?title=Main_Page"; description = "A clone of the simple yet addictive game Xjump"; diff --git a/pkgs/games/gnujump/gnujump.xpm b/pkgs/games/gnujump/gnujump.xpm new file mode 100644 index 000000000000..d8b6bcb4c8cb --- /dev/null +++ b/pkgs/games/gnujump/gnujump.xpm @@ -0,0 +1,64 @@ +/* XPM */ +static char *gnujump[] = { +/* columns rows colors chars-per-pixel */ +"32 32 26 1 ", +" c black", +". c #D10000", +"X c #E80000", +"o c #E90000", +"O c #F90000", +"+ c red", +"@ c #00C500", +"# c #00DC00", +"$ c #00DD00", +"% c #00EF00", +"& c #00FA00", +"* c #00FB00", +"= c green", +"- c #FFC882", +"; c #FFC982", +": c #FFD298", +"> c #FFD299", +", c #FFD399", +"< c #FFDAAB", +"1 c #FFDBAB", +"2 c #FFDBAC", +"3 c #FFE1BA", +"4 c #FFE5C3", +"5 c #FFE5C4", +"6 c #FFE7C7", +"7 c None", +/* pixels */ +"77777777777777777777777777777777", +"77777777777777777777777777777777", +"7777777777777 77777777777777", +"77777777777 777777777777", +"7777777777 77777777777", +"777777777 7777777777", +"777777777 ;;;-- 7777777777", +"77777777 ::>>,>1: 777777777", +"77777777 :<1<1:>2: 777777777", +"77777777 :1331: :: 7777 7777", +"77777777 :<3431: :, 777 o 777", +"777 777 ->236531>:2: 77 oo 777", +"77 .o 77 -,145443<1, 77 oOo 777", +"77 .ooo 7 -:13333312: 7 oOo 7777", +"777 oOOo :,11<<<:: oOOo 7777", +"7777 XOOooo :::>: XooO+Oo 7777", +"77777 oOOOOoo ooOOO+Oo 77777", +"777777 oOO+OOoooooOO++OOo 777777", +"7777777 XoOOOOOOOOOOOOoo 7777777", +"77777777 oooooooooooo 77777777", +"7777777777 7777777777", +"777777777 @@@@@@@@@@@@ 7777777", +"77777777 #######$$##$#### 777777", +"7777777 #%%%%%%%%%%%%%%%%# 77777", +"7777777 #%*&*&*%%%%%%*&*%# 77777", +"777777 #%*=**%%#####$%%&*%# 7777", +"777777 #%&*%%## ##%&%# 7777", +"77777 #%*%%## 777777 #%%# 7777", +"77777 #%%#$ 777777777 #%%# 777", +"7777 @%## 777777777777 #%# 777", +"7777 ## 7777777777777777 $# 777", +"77777 7777777777777777777 7777" +};