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}";
2019-01-26 09:15:40 +00:00
version = "1.10.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;
2019-01-26 09:15:40 +00:00
sha256 = "15fnf3r4pvl9gyvq0fy0l7p8xjaz44z9g4dzkn1l0fdhldib6z1c";
2018-02-18 11:46:24 +00:00
};
2019-01-26 09:15:40 +00:00
cargoSha256 = "1xlcfr2q2pw47sav9iryjva7w9chv90g18hszq8s0q0w71sccv6j";
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
};
}