3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/watchexec/default.nix

32 lines
1.1 KiB
Nix
Raw Normal View History

2018-10-27 17:32:39 +01:00
{ stdenv, rustPlatform, fetchFromGitHub, CoreServices, CoreFoundation }:
2018-02-18 11:46:24 +00:00
2018-08-21 11:00:11 +01:00
rustPlatform.buildRustPackage rec {
2018-02-18 11:46:24 +00:00
name = "watchexec-${version}";
2018-08-21 11:00:11 +01:00
version = "1.9.0";
2018-02-18 11:46:24 +00:00
src = fetchFromGitHub {
2018-08-21 11:00:11 +01:00
owner = "watchexec";
2018-02-18 11:46:24 +00:00
repo = "watchexec";
2018-08-21 11:00:11 +01:00
rev = version;
sha256 = "0zp5s2dy5zbar0virvy1izjpvvgwbz7rvjmcy6bph6rb5c4bhm70";
2018-02-18 11:46:24 +00:00
};
2018-08-21 11:00:11 +01:00
cargoSha256 = "1li84kq9myaw0zwx69y72f3lx01s7i9p8yays4rwvl1ymr614y1l";
2018-02-18 11:46:24 +00:00
2018-10-27 17:32:39 +01:00
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
# FIXME: Use impure version of CoreFoundation because of missing symbols.
# Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable"
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS"
'';
2018-02-18 11:46:24 +00:00
meta = with stdenv.lib; {
description = "Executes commands in response to file modifications";
2018-08-21 11:00:11 +01:00
homepage = https://github.com/watchexec/watchexec;
2018-02-18 11:46:24 +00:00
license = with licenses; [ asl20 ];
maintainers = [ maintainers.michalrus ];
2018-10-27 17:32:39 +01:00
platforms = platforms.linux ++ platforms.darwin;
2018-02-18 11:46:24 +00:00
};
}