about summary refs log tree commit diff
path: root/pkgs/games/mari0
diff options
context:
space:
mode:
authorSohalt <sohalt@sohalt.net>2020-05-07 21:50:18 +0200
committerGitHub <noreply@github.com>2020-05-07 12:50:18 -0700
commit64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46 (patch)
tree37653f521c3b051d3384038387d1dec233731983 /pkgs/games/mari0
parentd3760d44ee12321d5ee249619695a0f469aaffab (diff)
downloadnixlib-64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46.tar
nixlib-64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46.tar.gz
nixlib-64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46.tar.bz2
nixlib-64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46.tar.lz
nixlib-64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46.tar.xz
nixlib-64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46.tar.zst
nixlib-64bed7dde4b76e2f54741e4a07e6ef64e0ae9f46.zip
mari0: init at 1.6.2
* mari0: init at 1.6.2

* Quote URL per RFC 45, use SSL

Co-authored-by: Ryan Mulligan <ryan@ryantm.com>

* Inherit pname and version instead of setting name explicitly

Co-authored-by: Ryan Mulligan <ryan@ryantm.com>

Co-authored-by: Ryan Mulligan <ryan@ryantm.com>
Diffstat (limited to 'pkgs/games/mari0')
-rw-r--r--pkgs/games/mari0/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/games/mari0/default.nix b/pkgs/games/mari0/default.nix
new file mode 100644
index 000000000000..b8c4ea281dfd
--- /dev/null
+++ b/pkgs/games/mari0/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitHub, zip, love_11, lua, makeWrapper, makeDesktopItem }:
+
+let
+  pname = "mari0";
+  version = "1.6.2";
+
+  desktopItem = makeDesktopItem {
+    name = "mari0";
+    exec = pname;
+    comment = "Crossover between Super Mario Bros. and Portal";
+    desktopName = "mari0";
+    genericName = "mari0";
+    categories = "Game";
+  };
+
+in
+
+stdenv.mkDerivation {
+  inherit pname version;
+
+  src = fetchFromGitHub {
+    owner = "Stabyourself";
+    repo = pname;
+    rev = "${version}";
+    sha256 = "1zqaq4w599scsjvy1rsb21fd2r8j3srx9vym4ir9bh666dp36gxa";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ lua love_11 zip ];
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase =
+  ''
+    mkdir -p $out/bin $out/share/games/lovegames $out/share/applications
+    zip -9 -r ${pname}.love ./*
+    mv ${pname}.love $out/share/games/lovegames/${pname}.love
+    makeWrapper ${love_11}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
+    ln -s ${desktopItem}/share/applications/* $out/share/applications/
+    chmod +x $out/bin/${pname}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Crossover between Super Mario Bros. and Portal";
+    platforms = platforms.linux;
+    license = licenses.mit;
+    downloadPage = "https://stabyourself.net/mari0/";
+  };
+
+}