mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
0b5256a9c5
Semi-automatic update generated by https://github.com/ryantm/nix-update tools. This update was made based on information from https://repology.org/metapackage/rocksndiamonds/versions. These checks were done: - built on NixOS - ran `/nix/store/jz5l9xw33k6q5j5qvjslpq06w03ivafc-rocksndiamonds-4.0.1.4/bin/rocksndiamonds -h` got 0 exit code - ran `/nix/store/jz5l9xw33k6q5j5qvjslpq06w03ivafc-rocksndiamonds-4.0.1.4/bin/rocksndiamonds --help` got 0 exit code - ran `/nix/store/jz5l9xw33k6q5j5qvjslpq06w03ivafc-rocksndiamonds-4.0.1.4/bin/rocksndiamonds -V` and found version 4.0.1.4 - ran `/nix/store/jz5l9xw33k6q5j5qvjslpq06w03ivafc-rocksndiamonds-4.0.1.4/bin/rocksndiamonds --version` and found version 4.0.1.4 - found 4.0.1.4 with grep in /nix/store/jz5l9xw33k6q5j5qvjslpq06w03ivafc-rocksndiamonds-4.0.1.4 - directory tree listing: https://gist.github.com/cb40222a7b56f1f60a415ec319d8fe0c
50 lines
1.4 KiB
Nix
50 lines
1.4 KiB
Nix
{ stdenv, fetchurl, makeDesktopItem, SDL2, SDL2_image, SDL2_mixer, SDL2_net }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "${project}-${version}";
|
|
project = "rocksndiamonds";
|
|
version = "4.0.1.4";
|
|
|
|
src = fetchurl {
|
|
url = "https://www.artsoft.org/RELEASES/unix/${project}/${name}.tar.gz";
|
|
sha256 = "0rvi4crfh4rfczpsflzcfj6nqrg49mhm163k6ms9gxz97xj2jp3g";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|