summary refs log tree commit diff
path: root/pkgs/games/xjump/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/xjump/default.nix')
-rw-r--r--pkgs/games/xjump/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/games/xjump/default.nix b/pkgs/games/xjump/default.nix
index 29c89637c1dd..df9ff30f2101 100644
--- a/pkgs/games/xjump/default.nix
+++ b/pkgs/games/xjump/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, autoconf, automake, libX11, libXt, libXpm, libXaw, localStateDir?"/var" }:
+{ stdenv, buildPlatform, fetchFromGitHub, autoconf, automake, libX11, libXt, libXpm, libXaw, localStateDir?null }:
 
 stdenv.mkDerivation rec {
   name = "xjump-${version}";
@@ -12,7 +12,12 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ autoconf automake ];
   buildInputs = [ libX11 libXt libXpm libXaw ];
   preConfigure = "autoreconf --install";
-  configureFlags = ["--localstatedir=${localStateDir}"];
+  patches = if buildPlatform.isDarwin then [ ./darwin.patch ] else [];
+  configureFlags =
+    if localStateDir != null then
+      ["--localstatedir=${localStateDir}"]
+    else
+      [];
 
   meta = with stdenv.lib; {
     description = "The falling tower game";