1{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre
2, confFile ? config.watchman.confFile or null
3}:
4
5stdenv.mkDerivation rec {
6 name = "watchman-${version}";
7
8 version = "3.0.0";
9
10 src = fetchFromGitHub {
11 owner = "facebook";
12 repo = "watchman";
13 rev = "v${version}";
14 sha256 = "0sf0cp9p7savlgmzqj5m9fkpfa5a15pv98rkilxnbmx9wrjvypwk";
15 };
16
17 buildInputs = [ autoconf automake pcre ];
18
19 configureFlags = [
20 "--enable-lenient"
21 "--enable-conffile=${if confFile == null then "no" else confFile}"
22 "--with-pcre=yes"
23 ];
24
25 preConfigure = ''
26 ./autogen.sh
27 '';
28
29 meta = with lib; {
30 description = "Watches files and takes action when they change";
31 homepage = https://facebook.github.io/watchman;
32 maintainers = with maintainers; [ cstrahan ];
33 platforms = with platforms; linux ++ darwin;
34 license = licenses.asl20;
35 };
36}