Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / games / duckmarines / default.nix
bloba4e37081ab0ea9cff9447dfe47431c497173e1c3
1 { lib, stdenv, fetchurl, love, lua, makeWrapper, makeDesktopItem }:
3 stdenv.mkDerivation rec {
4   pname = "duckmarines";
5   version = "1.0c";
7   icon = fetchurl {
8     url = "http://tangramgames.dk/img/thumb/duckmarines.png";
9     sha256 = "07ypbwqcgqc5f117yxy9icix76wlybp1cmykc8f3ivdps66hl0k5";
10   };
12   desktopItem = makeDesktopItem {
13     name = "duckmarines";
14     exec = pname;
15     icon = icon;
16     comment = "Duck-themed action puzzle video game";
17     desktopName = "Duck Marines";
18     genericName = "duckmarines";
19     categories = [ "Game" ];
20   };
22   src = fetchurl {
23     url = "https://github.com/SimonLarsen/${pname}/releases/download/v${version}/${pname}-1.0c.love";
24     sha256 = "1rvgpkvi4h9zhc4fwb4knhsa789yjcx4a14fi4vqfdyybhvg5sh9";
25   };
27   nativeBuildInputs = [ makeWrapper ];
28   buildInputs = [ lua love ];
30   dontUnpack = true;
32   installPhase =
33   ''
34     mkdir -p $out/bin
35     mkdir -p $out/share/games/lovegames
37     cp -v ${src} $out/share/games/lovegames/${pname}.love
39     makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
41     chmod +x $out/bin/${pname}
42     mkdir -p $out/share/applications
43     ln -s ${desktopItem}/share/applications/* $out/share/applications/
44   '';
46   meta = with lib; {
47     description = "Duck-themed action puzzle video game";
48     maintainers = with maintainers; [ leenaars ];
49     platforms = platforms.linux;
50     hydraPlatforms = [];
51     license = licenses.free;
52     downloadPage = "http://tangramgames.dk/games/duckmarines";
53   };