From 57b5518727058aa1fb0a118450b2bea634821bb0 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sun, 15 Oct 2023 19:43:54 +0900 Subject: [PATCH] dprint: fix build on darwin https://github.com/dprint/dprint/compare/0.40.2...0.41.0 Build on darwin is broken with following errors since #260107 ``` sysinfo::apple::disk::get_disks::hf0f5e9ca54811ca0 in libsysinfo-2ada6af970649dda.rlib(sysinfo-2ada6af970649dda.sysinfo.7c30ee2e47e3fa9d-cgu.12.rcgu.o) "_kCFURLVolumeAvailableCapacityKey", referenced from: _$LT$sysinfo..apple..disk..Disk$u20$as$u20$sysinfo..traits..DiskExt$GT$::refresh::h54fb3881d5127506 in libsysinfo-2ada6af970649dda.rlib(sysinfo-2ada6af970649dda.sysinfo.7c30ee2e47e3fa9d-cgu.12.rcgu.o) sysinfo::apple::disk::get_disks::hf0f5e9ca54811ca0 in libsysinfo-2ada6af970649dda.rlib(sysinfo-2ada6af970649dda.sysinfo.7c30ee2e47e3fa9d-cgu.12.rcgu.o) ld: symbol(s) not found for architecture x86_64 clang-11: error: linker command failed with exit code 1 (use -v to see invocation) ``` --- pkgs/development/tools/dprint/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/dprint/default.nix b/pkgs/development/tools/dprint/default.nix index 92fda5e25d3a..c3609c97676b 100644 --- a/pkgs/development/tools/dprint/default.nix +++ b/pkgs/development/tools/dprint/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchCrate, rustPlatform, Security }: +{ lib, stdenv, fetchCrate, rustPlatform, CoreFoundation, Security }: rustPlatform.buildRustPackage rec { pname = "dprint"; @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-DauLzn+QkqTCPubrtasAZmD3DrIXkHk7zd8g589TCCk="; - buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation Security ]; # Tests fail because they expect a test WASM plugin. Tests already run for # every commit upstream on GitHub Actions diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5cbef890c420..1af77869e975 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18963,7 +18963,7 @@ with pkgs; dbt = with python3Packages; toPythonApplication dbt-core; dprint = callPackage ../development/tools/dprint { - inherit (darwin.apple_sdk.frameworks) Security; + inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation Security; }; devbox = callPackage ../development/tools/devbox { buildGoModule = buildGo121Module; };