nixpkgs/pkgs/development/tools/watchman/default.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

2019-06-19 17:55:22 +00:00
{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre
, libtool, pkg-config, openssl
2019-06-19 17:55:22 +00:00
, confFile ? config.watchman.confFile or null
, withApple ? stdenv.isDarwin, CoreServices
}:
stdenv.mkDerivation rec {
pname = "watchman";
2017-08-24 16:17:27 +00:00
version = "4.9.0";
src = fetchFromGitHub {
owner = "facebook";
repo = "watchman";
rev = "v${version}";
2017-08-24 16:17:27 +00:00
sha256 = "0fdaj5pmicm6j17d5q7px800m5rmam1a400x3hv1iiifnmhgnkal";
};
nativeBuildInputs = [ autoconf automake pkg-config libtool ];
2019-06-19 17:55:22 +00:00
buildInputs = [ pcre openssl ]
++ lib.optionals withApple [ CoreServices ];
configureFlags = [
2019-06-19 17:55:22 +00:00
"--enable-lenient"
"--enable-conffile=${if confFile == null then "no" else confFile}"
"--with-pcre=yes"
2019-06-19 17:55:22 +00:00
# For security considerations re: --disable-statedir, see:
# https://github.com/facebook/watchman/issues/178
"--disable-statedir"
];
2017-08-24 16:17:27 +00:00
prePatch = ''
patchShebangs .
'';
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;
};
}