about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorMichiel Leenaars <ml.software@leenaa.rs>2016-02-28 10:51:16 +0100
committerMichiel Leenaars <ml.software@leenaa.rs>2016-03-05 12:59:37 +0100
commit390effeb6e88d80cac6b140e2ec885667908a071 (patch)
tree9af5d89c5130fac033108563f603c50a1e40c8c8 /pkgs/games
parent02c7d65bf9030147150e593edad5f3213c1886cd (diff)
downloadnixlib-390effeb6e88d80cac6b140e2ec885667908a071.tar
nixlib-390effeb6e88d80cac6b140e2ec885667908a071.tar.gz
nixlib-390effeb6e88d80cac6b140e2ec885667908a071.tar.bz2
nixlib-390effeb6e88d80cac6b140e2ec885667908a071.tar.lz
nixlib-390effeb6e88d80cac6b140e2ec885667908a071.tar.xz
nixlib-390effeb6e88d80cac6b140e2ec885667908a071.tar.zst
nixlib-390effeb6e88d80cac6b140e2ec885667908a071.zip
orthorobot: init at unversioned
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/orthorobot/default.nix63
1 files changed, 63 insertions, 0 deletions
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/;
+  };
+
+}