nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, zip, love, makeWrapper, makeDesktopItem
2, copyDesktopItems }:
3
4stdenv.mkDerivation rec {
5 pname = "mari0";
6 version = "1.6.2";
7
8 src = fetchFromGitHub {
9 owner = "Stabyourself";
10 repo = pname;
11 rev = version;
12 sha256 = "1zqaq4w599scsjvy1rsb21fd2r8j3srx9vym4ir9bh666dp36gxa";
13 };
14
15 nativeBuildInputs = [ makeWrapper copyDesktopItems zip ];
16
17 desktopItems = [
18 (makeDesktopItem {
19 name = "mari0";
20 exec = pname;
21 comment = "Crossover between Super Mario Bros. and Portal";
22 desktopName = "mari0";
23 genericName = "mari0";
24 categories = [ "Game" ];
25 })
26 ];
27
28 installPhase = ''
29 runHook preInstall
30 zip -9 -r mari0.love ./*
31 install -Dm444 -t $out/share/games/lovegames/ mari0.love
32 makeWrapper ${love}/bin/love $out/bin/mari0 \
33 --add-flags $out/share/games/lovegames/mari0.love
34 runHook postInstall
35 '';
36
37 meta = with lib; {
38 description = "Crossover between Super Mario Bros. and Portal";
39 platforms = platforms.linux;
40 license = licenses.mit;
41 downloadPage = "https://stabyourself.net/mari0/";
42 };
43
44}