diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e7750bfc47f..71422e4ed5a 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -391,6 +391,11 @@ github = "asppsa"; name = "Alastair Pharo"; }; + astro = { + email = "astro@spaceboyz.net"; + github = "astro"; + name = "Astro"; + }; astsmtl = { email = "astsmtl@yandex.ru"; github = "astsmtl"; 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3960c659bb3..8c652ad936d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20628,6 +20628,8 @@ in frotz = callPackage ../games/frotz { }; + frogatto = callPackage ../games/frogatto { }; + fsg = callPackage ../games/fsg { wxGTK = wxGTK28.override { unicode = false; }; };