Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 65 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 love, 6 lua, 7 makeWrapper, 8 makeDesktopItem, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "duckmarines"; 13 version = "1.0c"; 14 15 icon = fetchurl { 16 url = "http://tangramgames.dk/img/thumb/duckmarines.png"; 17 sha256 = "07ypbwqcgqc5f117yxy9icix76wlybp1cmykc8f3ivdps66hl0k5"; 18 }; 19 20 desktopItem = makeDesktopItem { 21 name = "duckmarines"; 22 exec = pname; 23 icon = icon; 24 comment = "Duck-themed action puzzle video game"; 25 desktopName = "Duck Marines"; 26 genericName = "duckmarines"; 27 categories = [ "Game" ]; 28 }; 29 30 src = fetchurl { 31 url = "https://github.com/SimonLarsen/${pname}/releases/download/v${version}/${pname}-1.0c.love"; 32 sha256 = "1rvgpkvi4h9zhc4fwb4knhsa789yjcx4a14fi4vqfdyybhvg5sh9"; 33 }; 34 35 nativeBuildInputs = [ makeWrapper ]; 36 buildInputs = [ 37 lua 38 love 39 ]; 40 41 dontUnpack = true; 42 43 installPhase = '' 44 mkdir -p $out/bin 45 mkdir -p $out/share/games/lovegames 46 47 cp -v ${src} $out/share/games/lovegames/${pname}.love 48 49 makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love 50 51 chmod +x $out/bin/${pname} 52 mkdir -p $out/share/applications 53 ln -s ${desktopItem}/share/applications/* $out/share/applications/ 54 ''; 55 56 meta = with lib; { 57 description = "Duck-themed action puzzle video game"; 58 maintainers = with maintainers; [ leenaars ]; 59 platforms = platforms.linux; 60 hydraPlatforms = [ ]; 61 license = licenses.free; 62 downloadPage = "http://tangramgames.dk/games/duckmarines"; 63 }; 64 65}