about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLuke Clifton <luke-clifton@users.noreply.github.com>2018-09-22 22:18:47 +0800
committerJoachim F <joachifm@users.noreply.github.com>2018-09-22 14:18:47 +0000
commit4eebe205fe8287e0d2385ad15798d8b0146394dc (patch)
treef2b9706c45811549aafba45257000b294b0c81c1
parent3d8f6b61885bce149e2b2482ae3710f0ca48adca (diff)
dvtm: refactor (fix on darwin) (#47103)
-rw-r--r--pkgs/tools/misc/dvtm/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/tools/misc/dvtm/default.nix b/pkgs/tools/misc/dvtm/default.nix
index f25d134ca7902..58c602113ddb7 100644
--- a/pkgs/tools/misc/dvtm/default.nix
+++ b/pkgs/tools/misc/dvtm/default.nix
@@ -9,6 +9,17 @@ stdenv.mkDerivation rec {
     sha256 = "0475w514b7i3gxk6khy8pfj2gx9l7lv2pwacmq92zn1abv01a84g";
   };
 
+  patches = [
+    # https://github.com/martanne/dvtm/pull/69
+    # Use self-pipe instead of signal blocking fixes issues on darwin.
+    (fetchurl {
+      url = "https://github.com/martanne/dvtm/commit/1f1ed664d64603f3f1ce1388571227dc723901b2.patch";
+      sha256 = "1cby8x3ckvhzqa8yxlfrwzgm8wk7yz84kr9psdjr7xwpnca1cqrd";
+    })
+  ];
+
+  CFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE";
+
   postPatch = stdenv.lib.optionalString (customConfig != null) ''
     cp ${builtins.toFile "config.h" customConfig} ./config.h
   '';
@@ -28,7 +39,7 @@ stdenv.mkDerivation rec {
     description = "Dynamic virtual terminal manager";
     homepage = http://www.brain-dump.org/projects/dvtm;
     license = licenses.mit;
-    platforms = platforms.linux;
     maintainers = [ maintainers.vrthra ];
+    platforms = platforms.unix;
   };
 }