2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, makeDesktopItem, SDL2, SDL2_image, SDL2_mixer, SDL2_net }:
|
2017-08-26 23:55:11 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${project}-${version}";
|
|
|
|
project = "rocksndiamonds";
|
2018-10-23 20:01:52 +02:00
|
|
|
version = "4.1.1.0";
|
2017-08-26 23:55:11 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.artsoft.org/RELEASES/unix/${project}/${name}.tar.gz";
|
2018-10-23 20:01:52 +02:00
|
|
|
sha256 = "1k0m6l5g886d9mwwh6q0gw75qsb85mpf8i0rglh047app56nsk72";
|
2017-08-26 23:55:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-08-26 23:55:11 +02:00
|
|
|
description = "Scrolling tile-based arcade style puzzle game";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.artsoft.org/rocksndiamonds/";
|
2017-08-26 23:55:11 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|