diff --git a/pkgs/by-name/ca/caligula/package.nix b/pkgs/by-name/ca/caligula/package.nix index b423fa01beca..75cc0534138c 100644 --- a/pkgs/by-name/ca/caligula/package.nix +++ b/pkgs/by-name/ca/caligula/package.nix @@ -1,9 +1,6 @@ { lib , rustPlatform , fetchFromGitHub -, llvmPackages -, stdenv -, darwin }: rustPlatform.buildRustPackage rec { @@ -19,19 +16,9 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-ma7JVbWSiKfkCXCDwA8DFm2+KPrWR+8nSdgGSqehNg8="; - env = { - LIBCLANG_PATH = "${lib.getLib llvmPackages.libclang}/lib"; - }; - - - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin ( - with darwin.apple_sdk.frameworks; [ - Cocoa - IOKit - Foundation - DiskArbitration - ] - ); + nativeBuildInputs = [ + rustPlatform.bindgenHook + ]; RUSTFLAGS = "--cfg tracing_unstable"; diff --git a/pkgs/by-name/fe/fedimint/package.nix b/pkgs/by-name/fe/fedimint/package.nix index a3d2d5c7f97a..246375fff66a 100644 --- a/pkgs/by-name/fe/fedimint/package.nix +++ b/pkgs/by-name/fe/fedimint/package.nix @@ -1,28 +1,13 @@ { lib , buildPackages -, clang , fetchFromGitHub -, libclang -, libiconv -, llvmPackages_12 , openssl , pkg-config , protobuf , rustPlatform -, stdenv -, Security -, SystemConfiguration }: -let - # Rust rocksdb bindings have C++ compilation/linking errors on Darwin when using newer clang - # Forcing it to clang 12 fixes the issue. - buildRustPackage = - if stdenv.hostPlatform.isDarwin then - rustPlatform.buildRustPackage.override { stdenv = llvmPackages_12.stdenv; } - else - rustPlatform.buildRustPackage; -in -buildRustPackage rec { + +rustPlatform.buildRustPackage rec { pname = "fedimint"; version = "0.4.4"; @@ -38,17 +23,11 @@ buildRustPackage rec { nativeBuildInputs = [ protobuf pkg-config - clang - (lib.getLib libclang) + rustPlatform.bindgenHook ]; buildInputs = [ openssl - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Security - libiconv - Security - SystemConfiguration ]; outputs = [ "out" "fedimintCli" "fedimint" "gateway" "gatewayCli" "devimint" ]; @@ -79,7 +58,6 @@ buildRustPackage rec { PROTOC = "${buildPackages.protobuf}/bin/protoc"; PROTOC_INCLUDE = "${protobuf}/include"; OPENSSL_DIR = openssl.dev; - LIBCLANG_PATH = "${lib.getLib libclang}/lib"; FEDIMINT_BUILD_FORCE_GIT_HASH = "0000000000000000000000000000000000000000"; diff --git a/pkgs/by-name/li/libkrun/package.nix b/pkgs/by-name/li/libkrun/package.nix index 61da30b13478..92a03018ca42 100644 --- a/pkgs/by-name/li/libkrun/package.nix +++ b/pkgs/by-name/li/libkrun/package.nix @@ -11,7 +11,6 @@ , pipewire , virglrenderer , libkrunfw -, llvmPackages , rustc , withGpu ? false , withSound ? false @@ -38,8 +37,8 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ - llvmPackages.clang rustPlatform.cargoSetupHook + rustPlatform.bindgenHook cargo rustc ] ++ lib.optional (sevVariant || withGpu) pkg-config; @@ -52,8 +51,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional withSound pipewire ++ lib.optional sevVariant openssl; - env.LIBCLANG_PATH = "${lib.getLib llvmPackages.clang-unwrapped}/lib/libclang.so"; - makeFlags = [ "PREFIX=${placeholder "out"}" ] ++ lib.optional withGpu "GPU=1" diff --git a/pkgs/by-name/ne/neothesia/package.nix b/pkgs/by-name/ne/neothesia/package.nix index f474a82d2bf1..2b918d74cac1 100644 --- a/pkgs/by-name/ne/neothesia/package.nix +++ b/pkgs/by-name/ne/neothesia/package.nix @@ -6,7 +6,6 @@ , alsa-lib , wayland , makeWrapper -, llvmPackages , libxkbcommon , vulkan-loader , xorg @@ -33,8 +32,8 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config - llvmPackages.clang makeWrapper + rustPlatform.bindgenHook ]; cargoLock = { @@ -54,10 +53,6 @@ rustPlatform.buildRustPackage { install -Dm 644 flatpak/com.github.polymeilex.neothesia.png $out/share/icons/hicolor/256x256/apps/com.github.polymeilex.neothesia.png ''; - env = { - LIBCLANG_PATH = "${lib.getLib llvmPackages.libclang}/lib"; - }; - meta = { description = "Flashy Synthesia Like Software For Linux, Windows and macOS"; homepage = "https://github.com/PolyMeilex/Neothesia"; diff --git a/pkgs/by-name/nu/nufmt/package.nix b/pkgs/by-name/nu/nufmt/package.nix index d13f2834c674..8c956cb82080 100644 --- a/pkgs/by-name/nu/nufmt/package.nix +++ b/pkgs/by-name/nu/nufmt/package.nix @@ -4,10 +4,9 @@ fetchFromGitHub, rustPlatform, apple-sdk_11, - llvmPackages, nix-update-script, - ... }: + rustPlatform.buildRustPackage { pname = "nufmt"; version = "0-unstable-2024-11-21"; @@ -19,12 +18,14 @@ rustPlatform.buildRustPackage { hash = "sha256-ideILLOawU6BNawmr4lqt2LGkf29wvlwQe9gqgdYRiI="; }; + nativeBuildInputs = [ + rustPlatform.bindgenHook + ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ]; - env.LIBCLANG_PATH = lib.optionalString stdenv.cc.isClang "${lib.getLib llvmPackages.libclang}/lib"; - cargoHash = "sha256-MHZlXmHAYIiaB6Isutqjrh45jppRzTZRSE3VqzpFBBA="; passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; diff --git a/pkgs/by-name/se/servo/package.nix b/pkgs/by-name/se/servo/package.nix index af6fb95d9585..26bac5cf3487 100644 --- a/pkgs/by-name/se/servo/package.nix +++ b/pkgs/by-name/se/servo/package.nix @@ -110,6 +110,7 @@ rustPlatform.buildRustPackage { perl pkg-config python3 + rustPlatform.bindgenHook taplo which yasm @@ -142,8 +143,6 @@ rustPlatform.buildRustPackage { --prefix LD_LIBRARY_PATH : ${runtimePaths} ''; - LIBCLANG_PATH = "${lib.getLib llvmPackages.libclang}/lib"; - meta = { description = "The embeddable, independent, memory-safe, modular, parallel web rendering engine"; homepage = "https://servo.org"; diff --git a/pkgs/os-specific/linux/scx/scx_rustscheds.nix b/pkgs/os-specific/linux/scx/scx_rustscheds.nix index a5601cd4fcc1..1502f6fbb352 100644 --- a/pkgs/os-specific/linux/scx/scx_rustscheds.nix +++ b/pkgs/os-specific/linux/scx/scx_rustscheds.nix @@ -24,7 +24,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = [ pkg-config - llvmPackages.clang + rustPlatform.bindgenHook ]; buildInputs = [ elfutils @@ -33,7 +33,6 @@ rustPlatform.buildRustPackage { ]; env = { - LIBCLANG_PATH = "${lib.getLib llvmPackages.libclang}/lib"; BPF_CLANG = lib.getExe llvmPackages.clang; BPF_EXTRA_CFLAGS_PRE_INCL = lib.concatStringsSep " " [ "-I${scx.cscheds.dev}/libbpf/src/usr/include" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e6d18c1a3849..99b261a4a55e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2345,10 +2345,6 @@ with pkgs; fdroidcl = pkgs.callPackage ../development/mobile/fdroidcl { }; - fedimint = callPackage ../by-name/fe/fedimint/package.nix { - inherit (darwin.apple_sdk.frameworks) Security SystemConfiguration; - }; - flowgger = callPackage ../tools/misc/flowgger { inherit (darwin.apple_sdk.frameworks) CoreServices; };