diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2018-11-08 20:04:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 20:04:47 +0100 |
commit | a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b (patch) | |
tree | cc118d17ca64b3fc73f3598b0a45412186ab46e3 | |
parent | c4c735665b6dbe4465f6f212ad7cf283027159f8 (diff) | |
parent | 82365ebe0442b9f90a233ed24c822861a26d08da (diff) | |
download | nixlib-a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b.tar nixlib-a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b.tar.gz nixlib-a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b.tar.bz2 nixlib-a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b.tar.lz nixlib-a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b.tar.xz nixlib-a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b.tar.zst nixlib-a06e7c5b19ed5fcc4a6cbfc6418c4a8dc758ea1b.zip |
Merge pull request #49284 from LnL7/darwin-watchexec
watchexec: fix darwin build
-rw-r--r-- | pkgs/tools/misc/watchexec/default.nix | 12 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/tools/misc/watchexec/default.nix b/pkgs/tools/misc/watchexec/default.nix index e376568d3503..dd3eddf73954 100644 --- a/pkgs/tools/misc/watchexec/default.nix +++ b/pkgs/tools/misc/watchexec/default.nix @@ -1,4 +1,4 @@ -{ stdenv, rustPlatform, fetchFromGitHub }: +{ stdenv, rustPlatform, fetchFromGitHub, CoreServices, CoreFoundation }: rustPlatform.buildRustPackage rec { name = "watchexec-${version}"; @@ -13,11 +13,19 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1li84kq9myaw0zwx69y72f3lx01s7i9p8yays4rwvl1ymr614y1l"; + 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" + ''; + meta = with stdenv.lib; { description = "Executes commands in response to file modifications"; homepage = https://github.com/watchexec/watchexec; license = with licenses; [ asl20 ]; maintainers = [ maintainers.michalrus ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index faae4c93d5a3..0be9389489e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5997,7 +5997,9 @@ with pkgs; wal_e = callPackage ../tools/backup/wal-e { }; - watchexec = callPackage ../tools/misc/watchexec { }; + watchexec = callPackage ../tools/misc/watchexec { + inherit (darwin.apple_sdk.frameworks) CoreServices CoreFoundation; + }; watchman = callPackage ../development/tools/watchman { inherit (darwin.apple_sdk.frameworks) CoreServices; |