2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, copyDesktopItems
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, fetchurl
|
|
|
|
, love
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
|
|
|
, strip-nondeterminism
|
|
|
|
, zip
|
|
|
|
}:
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "orthorobot";
|
|
|
|
version = "1.1.1";
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stabyourself";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1ca6hvd890kxmamsmsfiqzw15ngsvb4lkihjb6kabgmss61a6s5p";
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
icon = fetchurl {
|
2023-04-12 12:48:02 +00:00
|
|
|
url = "https://stabyourself.net/images/screenshots/orthorobot-5.png";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "13fa4divdqz4vpdij1lcs5kf6w2c4jm3cc9q6bz5h7lkng31jzi6";
|
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "orthorobot";
|
|
|
|
exec = pname;
|
|
|
|
icon = icon;
|
|
|
|
comment = "Robot game";
|
|
|
|
desktopName = "Orthorobot";
|
|
|
|
genericName = "orthorobot";
|
|
|
|
categories = [ "Game" ];
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
copyDesktopItems
|
|
|
|
makeWrapper
|
|
|
|
strip-nondeterminism
|
|
|
|
zip
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
patches = [
|
|
|
|
# support for love11
|
2023-11-16 04:20:00 +00:00
|
|
|
# https://github.com/Stabyourself/orthorobot/pull/3
|
2023-04-12 12:48:02 +00:00
|
|
|
(fetchpatch {
|
2023-11-16 04:20:00 +00:00
|
|
|
name = "Stabyourself-orthorobot-pull-3.patch";
|
|
|
|
url = "https://github.com/Stabyourself/orthorobot/compare/48f07423950b29a94b04aefe268f2f951f55b62e...05856ba7dbf1bb86d0f16a5f511d8ee9f2176015.patch";
|
2023-04-12 12:48:02 +00:00
|
|
|
sha256 = "sha256-WHHP6QM7R5eEkVF+J2pGNnds/OKRIRXyon85wjd3GXI=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
installPhase = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
runHook preInstall
|
|
|
|
zip -9 -r orthorobot.love ./*
|
2023-07-15 17:15:38 +00:00
|
|
|
strip-nondeterminism --type zip orthorobot.love
|
2023-04-12 12:48:02 +00:00
|
|
|
install -Dm444 -t $out/share/games/lovegames/ orthorobot.love
|
|
|
|
makeWrapper ${love}/bin/love $out/bin/orthorobot \
|
|
|
|
--add-flags $out/share/games/lovegames/orthorobot.love
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Recharge the robot";
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.free;
|
2023-04-12 12:48:02 +00:00
|
|
|
downloadPage = "https://stabyourself.net/orthorobot/";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|