orthorobot: 1.0 -> 1.1.1 (#43495)

This commit is contained in:
leenaars 2018-07-14 00:22:48 +02:00 committed by xeji
parent 85f7fa93bc
commit d6899cf8b9
2 changed files with 14 additions and 20 deletions

View file

@ -1,8 +1,8 @@
{ stdenv, fetchurl, unzip, love, lua, makeWrapper, makeDesktopItem }: { stdenv, fetchurl, fetchFromGitHub, zip, love, lua, makeWrapper, makeDesktopItem }:
let let
pname = "orthorobot"; pname = "orthorobot";
version = "1.0"; version = "1.1.1";
icon = fetchurl { icon = fetchurl {
url = "http://stabyourself.net/images/screenshots/orthorobot-5.png"; url = "http://stabyourself.net/images/screenshots/orthorobot-5.png";
@ -24,32 +24,26 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchFromGitHub {
url = "http://stabyourself.net/dl.php?file=${pname}/${pname}-source.zip"; owner = "Stabyourself";
sha256 = "023nc3zwjkbmy4c8w6mfg39mg69zpqqr2gzlmp4fpydrjas70kbl"; repo = pname;
rev = "v${version}";
sha256 = "1ca6hvd890kxmamsmsfiqzw15ngsvb4lkihjb6kabgmss61a6s5p";
}; };
nativeBuildInputs = [ makeWrapper unzip ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ lua love ]; buildInputs = [ lua love zip ];
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
unzip -j $src
'';
installPhase = installPhase =
'' ''
mkdir -p $out/bin mkdir -p $out/bin $out/share/games/lovegames $out/share/applications
mkdir -p $out/share/games/lovegames zip -9 -r ${pname}.love ./*
mv ${pname}.love $out/share/games/lovegames/${pname}.love
cp -v ./*.love $out/share/games/lovegames/${pname}.love
makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${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/ ln -s ${desktopItem}/share/applications/* $out/share/applications/
chmod +x $out/bin/${pname}
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View file

@ -19732,7 +19732,7 @@ with pkgs;
openxcom = callPackage ../games/openxcom { }; openxcom = callPackage ../games/openxcom { };
orthorobot = callPackage ../games/orthorobot { love = love_0_7; }; orthorobot = callPackage ../games/orthorobot { };
pacvim = callPackage ../games/pacvim { }; pacvim = callPackage ../games/pacvim { };