diff options
author | Astro <astro@spaceboyz.net> | 2019-01-02 11:47:16 +0100 |
---|---|---|
committer | Jörg Thalheim <Mic92@users.noreply.github.com> | 2019-01-02 11:47:16 +0100 |
commit | 108588b75b689c209be74039bda5490c8be96c52 (patch) | |
tree | a2ced2342a9a28a0bbe061f4b6e7f26bf7bbc230 /pkgs/games/frogatto | |
parent | e0b3d65baaf6ce6b6dff418875c05ba7dd1394ee (diff) | |
download | nixpkgs-108588b75b689c209be74039bda5490c8be96c52.tar nixpkgs-108588b75b689c209be74039bda5490c8be96c52.tar.gz nixpkgs-108588b75b689c209be74039bda5490c8be96c52.tar.bz2 nixpkgs-108588b75b689c209be74039bda5490c8be96c52.tar.lz nixpkgs-108588b75b689c209be74039bda5490c8be96c52.tar.xz nixpkgs-108588b75b689c209be74039bda5490c8be96c52.tar.zst nixpkgs-108588b75b689c209be74039bda5490c8be96c52.zip |
frogatto: init at 0.0.2018-12-09 (#52989)
Diffstat (limited to 'pkgs/games/frogatto')
-rw-r--r-- | pkgs/games/frogatto/data.nix | 26 | ||||
-rw-r--r-- | pkgs/games/frogatto/default.nix | 43 | ||||
-rw-r--r-- | pkgs/games/frogatto/engine.nix | 50 |
3 files changed, 119 insertions, 0 deletions
diff --git a/pkgs/games/frogatto/data.nix b/pkgs/games/frogatto/data.nix new file mode 100644 index 00000000000..ec2cb941666 --- /dev/null +++ b/pkgs/games/frogatto/data.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "frogatto-data"; + version = "unstable-2018-12-18"; + + src = fetchFromGitHub { + owner = "frogatto"; + repo = "frogatto"; + # master branch as of 2018-12-18 + rev = "8f261b5d3fca3c88e6a534316a28378cf687d3e5"; + sha256 = "0nyfwfyy5gxp61ydna299nq9p5wra9mk0bf1drdngg6bwws1hrqx"; + }; + + installPhase = '' + mkdir -p $out/share/frogatto/modules + cp -ar . $out/share/frogatto/modules/frogatto + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/frogatto/frogatto; + description = "Data files to the frogatto game"; + license = with licenses; [ cc-by-30 unfree ]; + maintainers = with maintainers; [ astro ]; + }; +} diff --git a/pkgs/games/frogatto/default.nix b/pkgs/games/frogatto/default.nix new file mode 100644 index 00000000000..53be638e753 --- /dev/null +++ b/pkgs/games/frogatto/default.nix @@ -0,0 +1,43 @@ +{ lib, buildEnv, stdenv, callPackage, makeWrapper, makeDesktopItem }: + +let + description = "Action-adventure game, starring a certain quixotic frog"; + engine = callPackage ./engine.nix { }; + data = callPackage ./data.nix { }; + desktopItem = makeDesktopItem { + name = "frogatto"; + exec = "frogatto"; + startupNotify = "true"; + icon = "${data}/share/frogatto/modules/frogatto/images/os/frogatto-icon.png"; + comment = description; + desktopName = "Frogatto"; + genericName = "frogatto"; + categories = "Application;Game;ArcadeGame;"; + }; + version = "unstable-2018-12-18"; +in buildEnv rec { + name = "frogatto-${version}"; + + buildInputs = [ makeWrapper ]; + paths = [ engine data desktopItem ]; + pathsToLink = [ + "/bin" + "/share/frogatto/data" + "/share/frogatto/images" + "/share/frogatto/modules" + "/share/applications" + ]; + + postBuild = '' + wrapProgram $out/bin/frogatto \ + --run "cd $out/share/frogatto" + ''; + + meta = with stdenv.lib; { + homepage = https://frogatto.com; + description = description; + license = with licenses; [ cc-by-30 unfree ]; + platforms = platforms.linux; + maintainers = with maintainers; [ astro ]; + }; +} diff --git a/pkgs/games/frogatto/engine.nix b/pkgs/games/frogatto/engine.nix new file mode 100644 index 00000000000..b49224d258d --- /dev/null +++ b/pkgs/games/frogatto/engine.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchFromGitHub, bash, which +, boost, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf +, glew, zlib, icu, pkgconfig, cairo, libvpx }: + +stdenv.mkDerivation rec { + pname = "anura-engine"; + version = "unstable-2018-11-28"; + + src = fetchFromGitHub { + owner = "anura-engine"; + repo = "anura"; + # trunk branch as of 2018-11-28 + rev = "8070111467802dc772c0a6c7806ecd16b0bcdaa9"; + sha256 = "0xbqwfmws69n7iiz17n93h4jiw39cwyf7hxw0qi2c8cccr37b1nr"; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + which pkgconfig + ]; + + buildInputs = [ + boost + SDL2 + SDL2_image + SDL2_mixer + SDL2_ttf + glew + zlib + icu + cairo + libvpx + ]; + + enableParallelBuilding = true; + + installPhase = '' + mkdir -p $out/bin $out/share/frogatto + cp -ar data images modules $out/share/frogatto/ + cp -a anura $out/bin/frogatto + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/anura-engine/anura; + description = "Game engine used by Frogatto"; + license = licenses.zlib; + platforms = platforms.linux; + maintainers = with maintainers; [ astro ]; + }; +} |