at 22.05-pre 47 lines 1.2 kB view raw
1{ stdenv, lib, config, fetchFromGitHub, autoconf, automake, pcre 2, libtool, pkg-config, openssl 3, confFile ? config.watchman.confFile or null 4, withApple ? stdenv.isDarwin, CoreServices 5}: 6 7stdenv.mkDerivation rec { 8 pname = "watchman"; 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 nativeBuildInputs = [ autoconf automake pkg-config libtool ]; 19 buildInputs = [ pcre openssl ] 20 ++ lib.optionals withApple [ CoreServices ]; 21 22 configureFlags = [ 23 "--enable-lenient" 24 "--enable-conffile=${if confFile == null then "no" else confFile}" 25 "--with-pcre=yes" 26 27 # For security considerations re: --disable-statedir, see: 28 # https://github.com/facebook/watchman/issues/178 29 "--disable-statedir" 30 ]; 31 32 prePatch = '' 33 patchShebangs . 34 ''; 35 36 preConfigure = '' 37 ./autogen.sh 38 ''; 39 40 meta = with lib; { 41 description = "Watches files and takes action when they change"; 42 homepage = "https://facebook.github.io/watchman"; 43 maintainers = with maintainers; [ cstrahan ]; 44 platforms = with platforms; linux ++ darwin; 45 license = licenses.asl20; 46 }; 47}