2017-08-24 17:17:27 +01:00
|
|
|
{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre,
|
|
|
|
libtool, pkgconfig, openssl,
|
2018-05-16 05:16:15 +01:00
|
|
|
confFile ? config.watchman.confFile or null,
|
|
|
|
withApple ? stdenv.isDarwin, CoreServices, CoreFoundation
|
2014-07-05 21:34:51 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "watchman-${version}";
|
|
|
|
|
2017-08-24 17:17:27 +01:00
|
|
|
version = "4.9.0";
|
2014-07-05 21:34:51 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "facebook";
|
|
|
|
repo = "watchman";
|
|
|
|
rev = "v${version}";
|
2017-08-24 17:17:27 +01:00
|
|
|
sha256 = "0fdaj5pmicm6j17d5q7px800m5rmam1a400x3hv1iiifnmhgnkal";
|
2014-07-05 21:34:51 +01:00
|
|
|
};
|
|
|
|
|
2018-05-16 05:16:15 +01:00
|
|
|
buildInputs = [ pcre openssl ]
|
|
|
|
++ lib.optionals withApple [ CoreFoundation CoreServices ];
|
2017-08-24 17:17:27 +01:00
|
|
|
nativeBuildInputs = [ autoconf automake pkgconfig libtool ];
|
2014-07-05 21:34:51 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
2014-08-11 05:18:57 +01:00
|
|
|
"--enable-lenient"
|
2014-07-05 21:34:51 +01:00
|
|
|
"--enable-conffile=${if confFile == null then "no" else confFile}"
|
|
|
|
"--with-pcre=yes"
|
2016-01-28 16:58:33 +00:00
|
|
|
|
|
|
|
# For security considerations re: --disable-statedir, see:
|
|
|
|
# https://github.com/facebook/watchman/issues/178
|
2015-10-23 19:02:56 +01:00
|
|
|
"--disable-statedir"
|
2014-07-05 21:34:51 +01:00
|
|
|
];
|
|
|
|
|
2017-08-24 17:17:27 +01:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2014-07-05 21:34:51 +01:00
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Watches files and takes action when they change";
|
|
|
|
homepage = https://facebook.github.io/watchman;
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|