summary refs log tree commit diff
path: root/pkgs/games/frotz
diff options
context:
space:
mode:
authorDominic Delabruere <ddelabru@redhat.com>2020-08-01 14:11:36 -0400
committerDominic Delabruere <ddelabru@redhat.com>2020-08-06 15:23:15 -0400
commit677125876e1ee623f2f79a799f791c1f40202052 (patch)
tree9b7b675106ee882d25d49ddf44945bf1755c49f4 /pkgs/games/frotz
parent9fbbe30a44e31db059cd95de6046c01879f8c3dd (diff)
downloadnixpkgs-677125876e1ee623f2f79a799f791c1f40202052.tar
nixpkgs-677125876e1ee623f2f79a799f791c1f40202052.tar.gz
nixpkgs-677125876e1ee623f2f79a799f791c1f40202052.tar.bz2
nixpkgs-677125876e1ee623f2f79a799f791c1f40202052.tar.lz
nixpkgs-677125876e1ee623f2f79a799f791c1f40202052.tar.xz
nixpkgs-677125876e1ee623f2f79a799f791c1f40202052.tar.zst
nixpkgs-677125876e1ee623f2f79a799f791c1f40202052.zip
frotz: 2.44 -> 2.52
As a bonus, this new derivation also adds unicode support, which the current nixpkgs build lacks.
Diffstat (limited to 'pkgs/games/frotz')
-rw-r--r--pkgs/games/frotz/default.nix33
1 files changed, 24 insertions, 9 deletions
diff --git a/pkgs/games/frotz/default.nix b/pkgs/games/frotz/default.nix
index 40b6748693d..800da177a3d 100644
--- a/pkgs/games/frotz/default.nix
+++ b/pkgs/games/frotz/default.nix
@@ -1,25 +1,40 @@
-{ stdenv, fetchFromGitHub, ncurses }:
+{ fetchFromGitLab
+, libao
+, libmodplug
+, libsamplerate
+, libsndfile
+, libvorbis
+, ncurses
+, stdenv }:
 
 stdenv.mkDerivation rec {
-  version = "2.44";
+  version = "2.52";
   pname = "frotz";
 
-  src = fetchFromGitHub {
+  src = fetchFromGitLab {
+    domain = "gitlab.com";
     owner = "DavidGriffith";
     repo = "frotz";
     rev = version;
-    sha256 = "0gjkk4gxzqmxfdirrz2lr0bms6l9fc31vkmlywigkbdlh8wxgypp";
+    sha256 = "11ca1dz31b7s5vxjqncwjwmbbcr2m5v2rxjn49g4gnvwd6mqw48y";
   };
 
-  makeFlags = [ "CC=cc" "PREFIX=$(out)" "CURSES=-lncurses" ];
-
-  buildInputs = [ ncurses ];
+  buildInputs = [ libao libmodplug libsamplerate libsndfile libvorbis ncurses ];
+  preBuild = ''
+    makeFlagsArray+=(
+      CC="cc"
+      CFLAGS="-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600"
+      LDFLAGS="-lncursesw -ltinfo"
+    )
+  '';
+  installFlags = [ "PREFIX=$(out)" ];
 
   meta = with stdenv.lib; {
-    homepage = "http://frotz.sourceforge.net/";
+    homepage = "https://davidgriffith.gitlab.io/frotz/";
+    changelog = "https://gitlab.com/DavidGriffith/frotz/-/raw/${version}/NEWS";
     description = "A z-machine interpreter for Infocom games and other interactive fiction.";
     platforms = platforms.unix;
-    maintainers = [ maintainers.nicknovitski ];
+    maintainers = with maintainers; [ nicknovitski  ddelabru ];
     license = licenses.gpl2;
   };
 }