2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, love, lua, makeWrapper, makeDesktopItem }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "mrrescue";
|
|
|
|
version = "1.02d";
|
|
|
|
|
|
|
|
icon = fetchurl {
|
|
|
|
url = "http://tangramgames.dk/img/thumb/mrrescue.png";
|
|
|
|
sha256 = "1y5ahf0m01i1ch03axhvp2kqc6lc1yvh59zgvgxw4w7y3jryw20k";
|
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "mrrescue";
|
|
|
|
exec = pname;
|
|
|
|
icon = icon;
|
2021-02-05 17:12:51 +00:00
|
|
|
comment = "Arcade-style fire fighting game";
|
2020-04-24 23:36:52 +00:00
|
|
|
desktopName = "Mr. Rescue";
|
|
|
|
genericName = "mrrescue";
|
|
|
|
categories = "Game;";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/SimonLarsen/${pname}/releases/download/v${version}/${pname}-${version}.love";
|
|
|
|
sha256 = "0kzahxrgpb4vsk9yavy7f8nc34d62d1jqjrpsxslmy9ywax4yfpi";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ lua love makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
phases = "installPhase";
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/games/lovegames
|
|
|
|
|
|
|
|
cp -v $src $out/share/${pname}.love
|
|
|
|
|
|
|
|
makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
|
|
|
|
|
|
|
|
chmod +x $out/bin/${pname}
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Arcade-style fire fighting game";
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.zlib;
|
|
|
|
downloadPage = "http://tangramgames.dk/games/mrrescue";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|