2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchFromGitHub, zip, love, lua, makeWrapper, makeDesktopItem }:
|
2021-06-22 21:44:58 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-02-28 09:51:16 +00:00
|
|
|
pname = "orthorobot";
|
2018-07-13 22:22:48 +00:00
|
|
|
version = "1.1.1";
|
2016-02-28 09:51:16 +00:00
|
|
|
|
2021-06-22 21:44:58 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stabyourself";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1ca6hvd890kxmamsmsfiqzw15ngsvb4lkihjb6kabgmss61a6s5p";
|
|
|
|
};
|
|
|
|
|
2016-02-28 09:51:16 +00:00
|
|
|
icon = fetchurl {
|
|
|
|
url = "http://stabyourself.net/images/screenshots/orthorobot-5.png";
|
|
|
|
sha256 = "13fa4divdqz4vpdij1lcs5kf6w2c4jm3cc9q6bz5h7lkng31jzi6";
|
|
|
|
};
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "orthorobot";
|
2019-09-08 23:38:31 +00:00
|
|
|
exec = pname;
|
|
|
|
icon = icon;
|
2016-02-28 09:51:16 +00:00
|
|
|
comment = "Robot game";
|
|
|
|
desktopName = "Orthorobot";
|
|
|
|
genericName = "orthorobot";
|
|
|
|
categories = "Game;";
|
|
|
|
};
|
|
|
|
|
2018-07-13 22:22:48 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ lua love zip ];
|
2016-02-28 09:51:16 +00:00
|
|
|
|
2021-06-23 10:59:57 +00:00
|
|
|
dontBuild = true;
|
2016-02-28 09:51:16 +00:00
|
|
|
|
2021-06-23 10:59:57 +00:00
|
|
|
installPhase = ''
|
2018-07-13 22:22:48 +00:00
|
|
|
mkdir -p $out/bin $out/share/games/lovegames $out/share/applications
|
|
|
|
zip -9 -r ${pname}.love ./*
|
|
|
|
mv ${pname}.love $out/share/games/lovegames/${pname}.love
|
2016-02-28 09:51:16 +00:00
|
|
|
makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
2018-07-13 22:22:48 +00:00
|
|
|
chmod +x $out/bin/${pname}
|
2016-02-28 09:51:16 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-02-28 09:51:16 +00:00
|
|
|
description = "Recharge the robot";
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.free;
|
2020-04-01 01:11:51 +00:00
|
|
|
downloadPage = "http://stabyourself.net/orthorobot/";
|
2016-02-28 09:51:16 +00:00
|
|
|
};
|
|
|
|
}
|