about summary refs log tree commit diff
path: root/pkgs/games/hawkthorne
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/hawkthorne')
-rw-r--r--pkgs/games/hawkthorne/default.nix38
-rw-r--r--pkgs/games/hawkthorne/makefile.patch33
2 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/games/hawkthorne/default.nix b/pkgs/games/hawkthorne/default.nix
new file mode 100644
index 000000000000..4a99ec447640
--- /dev/null
+++ b/pkgs/games/hawkthorne/default.nix
@@ -0,0 +1,38 @@
+{ fetchgit, stdenv, love, curl, zip }:
+
+stdenv.mkDerivation rec {
+  version = "0.9.1";
+  name = "hawkthorne-${version}";
+
+  src = fetchgit {
+    url = "https://github.com/hawkthorne/hawkthorne-journey.git";
+    rev = "e48b5eef0058f63bb8ee746bc00b47b3e03f0854";
+    sha256 = "0rvcpv8fsi450xs2cglv4w6m5iqbhsr2n09pcvhh0krhg7xay538";
+  };
+
+  buildInputs = [
+    love curl zip
+  ];
+
+  patches = [
+    ./makefile.patch
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Journey to the Center of Hawkthorne - A fan-made retro-style game based on the show Community";
+    longDescription = ''
+      Journey to the Center of Hawkthorne is an open source game written in Love2D.
+      It's based on the show Community, starring Jim Rash and Joel McHale as
+      the primary will-they-or-won't-they relationship.
+
+      This game has been entirely developed by fans of the show, who were inspired
+      to bring to life the video game used to determine the winner of Pierce
+      Hawthorne's inheritance.
+    '';
+    homepage = "http://www.reddit.com/r/hawkthorne";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ campadrenalin ];
+  };
+}
diff --git a/pkgs/games/hawkthorne/makefile.patch b/pkgs/games/hawkthorne/makefile.patch
new file mode 100644
index 000000000000..16a79683149d
--- /dev/null
+++ b/pkgs/games/hawkthorne/makefile.patch
@@ -0,0 +1,33 @@
+diff --git a/Makefile b/Makefile
+index 55eb817..f3406aa 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,10 +18,14 @@ endif
+
+ tilemaps := $(patsubst %.tmx,%.lua,$(wildcard src/maps/*.tmx))
+
+-maps: $(tilemaps)
+-
+ love: build/hawkthorne.love
+
++shebang: build/hawkthorne.love
++	cat <(echo '#!/usr/bin/env love') build/hawkthorne.love > build/hawkthorne
++	chmod +x build/hawkthorne
++
++maps: $(tilemaps)
++
+ build/hawkthorne.love: $(tilemaps) src/*
+ 	mkdir -p build
+ 	cd src && zip --symlinks -q -r ../build/hawkthorne.love . -x ".*" \
+@@ -30,6 +34,12 @@ build/hawkthorne.love: $(tilemaps) src/*
+ run: $(tilemaps) $(LOVE)
+ 	$(LOVE) src
+
++check: test
++
++install: shebang
++	mkdir -p $(out)/bin
++	cp build/hawkthorne $(out)/bin
++
+ src/maps/%.lua: src/maps/%.tmx bin/tmx2lua
+ 	bin/tmx2lua $<