diff --git a/pkgs/games/orthorobot/default.nix b/pkgs/games/orthorobot/default.nix new file mode 100644 index 000000000000..b1a39a609a1b --- /dev/null +++ b/pkgs/games/orthorobot/default.nix @@ -0,0 +1,63 @@ +{ stdenv, fetchurl, unzip, love, lua, makeWrapper, makeDesktopItem }: + +let + pname = "orthorobot"; + version = "1.0"; + + icon = fetchurl { + url = "http://stabyourself.net/images/screenshots/orthorobot-5.png"; + sha256 = "13fa4divdqz4vpdij1lcs5kf6w2c4jm3cc9q6bz5h7lkng31jzi6"; + }; + + desktopItem = makeDesktopItem { + name = "orthorobot"; + exec = "${pname}"; + icon = "${icon}"; + comment = "Robot game"; + desktopName = "Orthorobot"; + genericName = "orthorobot"; + categories = "Game;"; + }; + +in + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "http://stabyourself.net/dl.php?file=${pname}/${pname}-source.zip"; + sha256 = "023nc3zwjkbmy4c8w6mfg39mg69zpqqr2gzlmp4fpydrjas70kbl"; + }; + + nativeBuildInputs = [ makeWrapper unzip ]; + buildInputs = [ lua love ]; + + phases = [ "unpackPhase" "installPhase" ]; + + unpackPhase = '' + unzip -j $src + ''; + + installPhase = + '' + mkdir -p $out/bin + mkdir -p $out/share/games/lovegames + + cp -v ./*.love $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/ + ''; + + meta = with stdenv.lib; { + description = "Recharge the robot"; + maintainers = with maintainers; [ leenaars ]; + platforms = platforms.linux; + license = licenses.free; + downloadPage = http://stabyourself.net/orthorobot/; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6e6ba7d1e7a3..b9ccd785d7d7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14633,6 +14633,8 @@ let openxcom = callPackage ../games/openxcom { }; + orthorobot = callPackage ../games/orthorobot { love = love_0_7; }; + performous = callPackage ../games/performous { }; pingus = callPackage ../games/pingus {};