summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2014-04-16 16:43:32 -0500
committerJohn Wiegley <johnw@newartisans.com>2014-04-16 16:43:32 -0500
commit0556bc0fcba94f09c0175846706383eae8223f1d (patch)
treed9bec46dfae64231fafe19b167f848022fe59eab
parenta1af25033a248fc75fcff4ac7441676a61cde8a0 (diff)
downloadnixlib-0556bc0fcba94f09c0175846706383eae8223f1d.tar
nixlib-0556bc0fcba94f09c0175846706383eae8223f1d.tar.gz
nixlib-0556bc0fcba94f09c0175846706383eae8223f1d.tar.bz2
nixlib-0556bc0fcba94f09c0175846706383eae8223f1d.tar.lz
nixlib-0556bc0fcba94f09c0175846706383eae8223f1d.tar.xz
nixlib-0556bc0fcba94f09c0175846706383eae8223f1d.tar.zst
nixlib-0556bc0fcba94f09c0175846706383eae8223f1d.zip
Add hfsevents expression, and make fsnotify use it on darwin
-rw-r--r--pkgs/development/libraries/haskell/fsnotify/default.nix10
-rw-r--r--pkgs/development/libraries/haskell/hfsevents/default.nix16
-rw-r--r--pkgs/top-level/haskell-packages.nix2
3 files changed, 24 insertions, 4 deletions
diff --git a/pkgs/development/libraries/haskell/fsnotify/default.nix b/pkgs/development/libraries/haskell/fsnotify/default.nix
index 1ef55d105f79..3d308f6a88fa 100644
--- a/pkgs/development/libraries/haskell/fsnotify/default.nix
+++ b/pkgs/development/libraries/haskell/fsnotify/default.nix
@@ -1,16 +1,18 @@
-{ cabal, Cabal, Glob, hinotify, hspec, QuickCheck, random
+{ stdenv, cabal, Cabal, Glob, hspec, QuickCheck, random
 , systemFileio, systemFilepath, text, time, uniqueid
+, hinotify, hfsevents
 }:
 
 cabal.mkDerivation (self: {
   pname = "fsnotify";
   version = "0.0.11";
   sha256 = "03m911pncyzgfdx4aj38azbbmj25fdm3s9l1w27zv0l730fy8ywq";
-  buildDepends = [ hinotify systemFileio systemFilepath text time ];
+  buildDepends = [ systemFileio systemFilepath text time ] ++
+    (if stdenv.isDarwin then [ hfsevents ] else [ hinotify ]);
   testDepends = [
-    Cabal Glob hinotify hspec QuickCheck random systemFileio
+    Cabal Glob hspec QuickCheck random systemFileio
     systemFilepath text time uniqueid
-  ];
+  ] ++ (if stdenv.isDarwin then [ hfsevents ] else [ hinotify ]);
   doCheck = false;
   meta = {
     description = "Cross platform library for file change notification";
diff --git a/pkgs/development/libraries/haskell/hfsevents/default.nix b/pkgs/development/libraries/haskell/hfsevents/default.nix
new file mode 100644
index 000000000000..624420fb0ca3
--- /dev/null
+++ b/pkgs/development/libraries/haskell/hfsevents/default.nix
@@ -0,0 +1,16 @@
+{ cabal, cereal, mtl, text, gccApple }:
+
+cabal.mkDerivation (self: {
+  pname = "hfsevents";
+  version = "0.1.5";
+  sha256 = "0hp9jjj59smfcs51d9zjhyvgdbn46l0rl0jr98wbzg3qya0vwj5k";
+  buildDepends = [ cereal mtl text ];
+  buildTools = [ gccApple ];
+  configureFlags = "--ghc-option=-pgmc=${gccApple}/bin/gcc";
+  meta = {
+    homepage = "http://github.com/luite/hfsevents";
+    description = "File/folder watching for OS X";
+    license = self.stdenv.lib.licenses.bsd3;
+    platforms = self.stdenv.lib.platforms.darwin;
+  };
+})
diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix
index 283f3ffdcca1..a2a34c8cbadb 100644
--- a/pkgs/top-level/haskell-packages.nix
+++ b/pkgs/top-level/haskell-packages.nix
@@ -1398,6 +1398,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
 
   hflags = callPackage ../development/libraries/haskell/hflags {};
 
+  hfsevents = callPackage ../development/libraries/haskell/hfsevents {};
+
   HFuse = callPackage ../development/libraries/haskell/HFuse {};
 
   highlightingKate = callPackage ../development/libraries/haskell/highlighting-kate {};