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