orthorobot: repair and cleanup
This commit is contained in:
parent
6065d768e1
commit
f4140ff015
1 changed files with 30 additions and 21 deletions
|
@ -1,4 +1,6 @@
|
||||||
{ lib, stdenv, fetchurl, fetchFromGitHub, zip, love, lua, makeWrapper, makeDesktopItem }:
|
{ lib, stdenv, fetchurl, fetchFromGitHub, love, zip, fetchpatch, makeWrapper
|
||||||
|
, makeDesktopItem, copyDesktopItems }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "orthorobot";
|
pname = "orthorobot";
|
||||||
version = "1.1.1";
|
version = "1.1.1";
|
||||||
|
@ -11,32 +13,39 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
icon = fetchurl {
|
icon = fetchurl {
|
||||||
url = "http://stabyourself.net/images/screenshots/orthorobot-5.png";
|
url = "https://stabyourself.net/images/screenshots/orthorobot-5.png";
|
||||||
sha256 = "13fa4divdqz4vpdij1lcs5kf6w2c4jm3cc9q6bz5h7lkng31jzi6";
|
sha256 = "13fa4divdqz4vpdij1lcs5kf6w2c4jm3cc9q6bz5h7lkng31jzi6";
|
||||||
};
|
};
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItems = [
|
||||||
name = "orthorobot";
|
(makeDesktopItem {
|
||||||
exec = pname;
|
name = "orthorobot";
|
||||||
icon = icon;
|
exec = pname;
|
||||||
comment = "Robot game";
|
icon = icon;
|
||||||
desktopName = "Orthorobot";
|
comment = "Robot game";
|
||||||
genericName = "orthorobot";
|
desktopName = "Orthorobot";
|
||||||
categories = [ "Game" ];
|
genericName = "orthorobot";
|
||||||
};
|
categories = [ "Game" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper zip copyDesktopItems ];
|
||||||
buildInputs = [ lua love zip ];
|
|
||||||
|
|
||||||
dontBuild = true;
|
patches = [
|
||||||
|
# support for love11
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/Stabyourself/orthorobot/pull/3.patch";
|
||||||
|
sha256 = "sha256-WHHP6QM7R5eEkVF+J2pGNnds/OKRIRXyon85wjd3GXI=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/games/lovegames $out/share/applications
|
runHook preInstall
|
||||||
zip -9 -r ${pname}.love ./*
|
zip -9 -r orthorobot.love ./*
|
||||||
mv ${pname}.love $out/share/games/lovegames/${pname}.love
|
install -Dm444 -t $out/share/games/lovegames/ orthorobot.love
|
||||||
makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
|
makeWrapper ${love}/bin/love $out/bin/orthorobot \
|
||||||
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
--add-flags $out/share/games/lovegames/orthorobot.love
|
||||||
chmod +x $out/bin/${pname}
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -44,6 +53,6 @@ stdenv.mkDerivation rec {
|
||||||
maintainers = with maintainers; [ leenaars ];
|
maintainers = with maintainers; [ leenaars ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.free;
|
license = licenses.free;
|
||||||
downloadPage = "http://stabyourself.net/orthorobot/";
|
downloadPage = "https://stabyourself.net/orthorobot/";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue