From 1ceef41c298ed187a752f30f6ca58c7b8080fb45 Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Tue, 16 Apr 2019 23:18:13 -0700 Subject: [PATCH] watchexec: remove Darwin hack in favor of cf-private (#59428) --- pkgs/tools/misc/watchexec/default.nix | 14 ++++++-------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/misc/watchexec/default.nix b/pkgs/tools/misc/watchexec/default.nix index ddfdf0f492f7..b3f5e90c3f4e 100644 --- a/pkgs/tools/misc/watchexec/default.nix +++ b/pkgs/tools/misc/watchexec/default.nix @@ -1,4 +1,4 @@ -{ stdenv, rustPlatform, fetchFromGitHub, CoreServices, CoreFoundation }: +{ stdenv, rustPlatform, fetchFromGitHub, CoreServices, darwin }: rustPlatform.buildRustPackage rec { name = "watchexec-${version}"; @@ -13,13 +13,11 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1xlcfr2q2pw47sav9iryjva7w9chv90g18hszq8s0q0w71sccv6j"; - 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" - ''; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ + CoreServices + # This is needed to avoid an undefined symbol error "_CFURLResourceIsReachable" + darwin.cf-private + ]; meta = with stdenv.lib; { description = "Executes commands in response to file modifications"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4748f00e66d2..70018a69fdf7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6282,7 +6282,7 @@ in wal_e = callPackage ../tools/backup/wal-e { }; watchexec = callPackage ../tools/misc/watchexec { - inherit (darwin.apple_sdk.frameworks) CoreServices CoreFoundation; + inherit (darwin.apple_sdk.frameworks) CoreServices; }; watchman = callPackage ../development/tools/watchman {