diff --git a/pkgs/games/rocksndiamonds/default.nix b/pkgs/games/rocksndiamonds/default.nix new file mode 100644 index 000000000000..caaedc44ee0c --- /dev/null +++ b/pkgs/games/rocksndiamonds/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, makeDesktopItem, SDL2, SDL2_image, SDL2_mixer, SDL2_net }: + +stdenv.mkDerivation rec { + name = "${project}-${version}"; + project = "rocksndiamonds"; + version = "4.0.0.2"; + + src = fetchurl { + url = "https://www.artsoft.org/RELEASES/unix/${project}/${name}.tar.gz"; + sha256 = "0dzn6vlayvnkjm64zwva337rn07lc21kq93m2h8zz8j3wpl11pb4"; + }; + + desktopItem = makeDesktopItem { + name = "rocksndiamonds"; + exec = "rocksndiamonds"; + icon = "rocksndiamonds"; + comment = meta.description; + desktopName = "Rocks'n'Diamonds"; + genericName = "Tile-based puzzle"; + categories = "Game;LogicGame;"; + }; + + buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net ]; + + preBuild = '' + dataDir="$out/share/rocksndiamonds" + makeFlags+="RO_GAME_DIR=$dataDir" + ''; + + installPhase = '' + appDir=$out/share/applications + iconDir=$out/share/icons/hicolor/32x32/apps + mkdir -p $out/bin $appDir $iconDir $dataDir + cp rocksndiamonds $out/bin/ + ln -s ${desktopItem}/share/applications/* $appDir/ + ln -s $dataDir/graphics/gfx_classic/RocksIcon32x32.png $iconDir/rocksndiamonds.png + cp -r docs graphics levels music sounds $dataDir + ''; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Scrolling tile-based arcade style puzzle game"; + homepage = https://www.artsoft.org/rocksndiamonds/; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ orivej ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 49b32f30e132..71cd91fff58b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17513,6 +17513,8 @@ with pkgs; robotfindskitten = callPackage ../games/robotfindskitten { }; + rocksndiamonds = callPackage ../games/rocksndiamonds { }; + saga = callPackage ../applications/gis/saga { }; samplv1 = callPackage ../applications/audio/samplv1 { };