lol
1{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre,
2 libtool, pkgconfig, openssl,
3 confFile ? config.watchman.confFile or null
4}:
5
6stdenv.mkDerivation rec {
7 name = "watchman-${version}";
8
9 version = "4.9.0";
10
11 src = fetchFromGitHub {
12 owner = "facebook";
13 repo = "watchman";
14 rev = "v${version}";
15 sha256 = "0fdaj5pmicm6j17d5q7px800m5rmam1a400x3hv1iiifnmhgnkal";
16 };
17
18 buildInputs = [ pcre openssl ];
19 nativeBuildInputs = [ autoconf automake pkgconfig libtool ];
20
21 configureFlags = [
22 "--enable-lenient"
23 "--enable-conffile=${if confFile == null then "no" else confFile}"
24 "--with-pcre=yes"
25
26 # For security considerations re: --disable-statedir, see:
27 # https://github.com/facebook/watchman/issues/178
28 "--disable-statedir"
29 ];
30
31 prePatch = ''
32 patchShebangs .
33 '';
34
35 preConfigure = ''
36 ./autogen.sh
37 '';
38
39 meta = with lib; {
40 description = "Watches files and takes action when they change";
41 homepage = https://facebook.github.io/watchman;
42 maintainers = with maintainers; [ cstrahan ];
43 platforms = with platforms; linux ++ darwin;
44 license = licenses.asl20;
45 };
46}