diff options
Diffstat (limited to 'pkgs/development')
33 files changed, 169 insertions, 116 deletions
diff --git a/pkgs/development/compilers/rust/clippy.nix b/pkgs/development/compilers/rust/clippy.nix index 018aba1f35682..8459002743bb8 100644 --- a/pkgs/development/compilers/rust/clippy.nix +++ b/pkgs/development/compilers/rust/clippy.nix @@ -1,8 +1,8 @@ -{ stdenv, lib, rustPlatform, Security, patchelf }: +{ stdenv, lib, rustPlatform, rustc, Security, patchelf }: rustPlatform.buildRustPackage { pname = "clippy"; - inherit (rustPlatform.rust.rustc) version src; + inherit (rustc) version src; separateDebugInfo = true; @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage { # changes hash of vendor directory otherwise dontUpdateAutotoolsGnuConfigScripts = true; - buildInputs = [ rustPlatform.rust.rustc.llvm ] + buildInputs = [ rustc.llvm ] ++ lib.optionals stdenv.isDarwin [ Security ]; # fixes: error: the option `Z` is only accepted on the nightly compiler @@ -31,8 +31,8 @@ rustPlatform.buildRustPackage { # [0]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/src/bootstrap/builder.rs#L1543 # [1]: https://github.com/rust-lang/rust/blob/f77f4d55bdf9d8955d3292f709bd9830c2fdeca5/compiler/rustc_codegen_ssa/src/back/linker.rs#L323-L331 preFixup = lib.optionalString stdenv.isDarwin '' - install_name_tool -add_rpath "${rustPlatform.rust.rustc}/lib" "$out/bin/clippy-driver" - install_name_tool -add_rpath "${rustPlatform.rust.rustc}/lib" "$out/bin/cargo-clippy" + install_name_tool -add_rpath "${rustc}/lib" "$out/bin/clippy-driver" + install_name_tool -add_rpath "${rustc}/lib" "$out/bin/cargo-clippy" ''; meta = with lib; { diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index 1ef03420ced9a..5c0cf10fbc9ab 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -68,6 +68,7 @@ in patches = rustcPatches; # Use boot package set to break cycle + inherit (bootstrapRustPackages) cargo rustc; rustPlatform = bootRustPlatform; } // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) { stdenv = llvmBootstrapForDarwin.stdenv; @@ -75,7 +76,10 @@ in pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmBootstrapForDarwin.stdenv; }; pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmBootstrapForDarwin.stdenv; }; }); - rustfmt = self.callPackage ./rustfmt.nix { inherit Security; }; + rustfmt = self.callPackage ./rustfmt.nix { + inherit Security; + inherit (self.buildRustPackages) rustc; + }; cargo = self.callPackage ./cargo.nix { # Use boot package set to break cycle rustPlatform = bootRustPlatform; @@ -83,7 +87,7 @@ in }; cargo-auditable = self.callPackage ./cargo-auditable.nix { }; cargo-auditable-cargo-wrapper = self.callPackage ./cargo-auditable-cargo-wrapper.nix { }; - clippy = callPackage ./clippy.nix { + clippy = self.callPackage ./clippy.nix { # We want to use self, not buildRustPackages, so that # buildPackages.clippy uses the cross compiler and supports # linting for the target platform. diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index fc43cfe2e2658..500b63c692752 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -1,7 +1,7 @@ { lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget, targetPackages , llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget, llvmPackages , fetchurl, file, python3 -, darwin, cmake, rust, rustPlatform +, darwin, cargo, cmake, rust, rustc, rustPlatform , pkg-config, openssl, xz , libiconv , which, libffi @@ -73,8 +73,8 @@ in stdenv.mkDerivation rec { cxxForTarget = "${pkgsBuildTarget.targetPackages.stdenv.cc}/bin/${pkgsBuildTarget.targetPackages.stdenv.cc.targetPrefix}c++"; in [ "--release-channel=stable" - "--set=build.rustc=${rustPlatform.rust.rustc}/bin/rustc" - "--set=build.cargo=${rustPlatform.rust.cargo}/bin/cargo" + "--set=build.rustc=${rustc}/bin/rustc" + "--set=build.cargo=${cargo}/bin/cargo" "--enable-rpath" "--enable-vendor" "--build=${rust.toRustTargetSpec stdenv.buildPlatform}" @@ -180,7 +180,7 @@ in stdenv.mkDerivation rec { depsBuildBuild = [ pkgsBuildHost.stdenv.cc pkg-config ]; nativeBuildInputs = [ - file python3 rustPlatform.rust.rustc cmake + file python3 rustc cmake which libffi removeReferencesTo pkg-config xz ]; diff --git a/pkgs/development/compilers/rust/rustfmt.nix b/pkgs/development/compilers/rust/rustfmt.nix index 1ff36e71e82ba..4bee49eff5a19 100644 --- a/pkgs/development/compilers/rust/rustfmt.nix +++ b/pkgs/development/compilers/rust/rustfmt.nix @@ -1,8 +1,8 @@ -{ lib, stdenv, rustPlatform, Security, asNightly ? false }: +{ lib, stdenv, rustPlatform, rustc, Security, asNightly ? false }: rustPlatform.buildRustPackage rec { pname = "rustfmt" + lib.optionalString asNightly "-nightly"; - inherit (rustPlatform.rust.rustc) version src; + inherit (rustc) version src; # the rust source tarball already has all the dependencies vendored, no need to fetch them again cargoVendorDir = "vendor"; @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { dontUpdateAutotoolsGnuConfigScripts = true; buildInputs = [ - rustPlatform.rust.rustc.llvm + rustc.llvm ] ++ lib.optional stdenv.isDarwin Security; # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec { # As of rustc 1.45.0, these env vars are required to build rustfmt (due to # https://github.com/rust-lang/rust/pull/72001) - CFG_RELEASE = rustPlatform.rust.rustc.version; + CFG_RELEASE = rustc.version; CFG_RELEASE_CHANNEL = if asNightly then "nightly" else "stable"; meta = with lib; { diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix index 806b1382bf9ef..273f5f8d8b1c6 100644 --- a/pkgs/development/interpreters/ruby/default.nix +++ b/pkgs/development/interpreters/ruby/default.nix @@ -2,7 +2,7 @@ , fetchurl, fetchpatch, fetchFromSavannah, fetchFromGitHub , zlib, gdbm, ncurses, readline, groff, libyaml, libffi, jemalloc, autoreconfHook, bison , autoconf, libiconv, libobjc, libunwind, Foundation -, buildEnv, bundler, bundix, rustPlatform +, buildEnv, bundler, bundix, cargo, rustPlatform, rustc , makeBinaryWrapper, buildRubyGem, defaultGemConfig, removeReferencesTo , openssl, openssl_1_1 , linuxPackages, libsystemtap @@ -48,7 +48,7 @@ let # $(nix-build -A ruby)/lib/ruby/2.6.0/x86_64-linux/rbconfig.rb # - In $out/lib/libruby.so and/or $out/lib/libruby.dylib , removeReferencesTo, jitSupport ? yjitSupport - , rustPlatform, yjitSupport ? yjitSupported + , cargo, rustPlatform, rustc, yjitSupport ? yjitSupported , autoreconfHook, bison, autoconf , buildEnv, bundler, bundix , libiconv, libobjc, libunwind, Foundation @@ -78,7 +78,7 @@ let nativeBuildInputs = [ autoreconfHook bison ] ++ (op docSupport groff) ++ (ops (dtraceSupport && stdenv.isLinux) [ systemtap libsystemtap ]) - ++ ops yjitSupport [ rustPlatform.cargoSetupHook rustPlatform.rust.cargo rustPlatform.rust.rustc ] + ++ ops yjitSupport [ rustPlatform.cargoSetupHook cargo rustc ] ++ op useBaseRuby baseRuby; buildInputs = [ autoconf ] ++ (op fiddleSupport libffi) diff --git a/pkgs/development/libraries/libdeltachat/default.nix b/pkgs/development/libraries/libdeltachat/default.nix index 48bd326ec6284..037dd57ed64f9 100644 --- a/pkgs/development/libraries/libdeltachat/default.nix +++ b/pkgs/development/libraries/libdeltachat/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, cargo , cmake , openssl , perl @@ -45,10 +46,9 @@ stdenv.mkDerivation rec { cmake perl pkg-config - ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - ]) ++ lib.optionals stdenv.isDarwin [ + rustPlatform.cargoSetupHook + cargo + ] ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ]; diff --git a/pkgs/development/libraries/libkrun/default.nix b/pkgs/development/libraries/libkrun/default.nix index e2d804050689e..b924dc5e3907c 100644 --- a/pkgs/development/libraries/libkrun/default.nix +++ b/pkgs/development/libraries/libkrun/default.nix @@ -3,12 +3,14 @@ , fetchFromGitHub , fetchurl , rustPlatform +, cargo , pkg-config , dtc , glibc , openssl , libiconv , libkrunfw +, rustc , Hypervisor , sevVariant ? false }: @@ -32,10 +34,10 @@ stdenv.mkDerivation rec { hash = "sha256-nbtp7FP+ObVGfDOEzTt4Z7TZwcNlREczTKIAXGSflZU="; }; - nativeBuildInputs = with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + cargo + rustc ] ++ lib.optional sevVariant pkg-config; buildInputs = [ diff --git a/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix b/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix index aa9278a145689..2d77c6e5874c7 100644 --- a/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix +++ b/pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix @@ -1,4 +1,6 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, napi-rs-cli, nodejs, libiconv }: +{ lib, stdenv, fetchFromGitHub +, cargo, rustPlatform, rustc, napi-rs-cli, nodejs, libiconv +}: stdenv.mkDerivation rec { pname = "matrix-sdk-crypto-nodejs"; @@ -26,8 +28,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ rustPlatform.cargoSetupHook - rustPlatform.rust.cargo - rustPlatform.rust.rustc + cargo + rustc napi-rs-cli nodejs ]; diff --git a/pkgs/development/python-modules/aardwolf/default.nix b/pkgs/development/python-modules/aardwolf/default.nix index debfd054c6e04..83db24896cbca 100644 --- a/pkgs/development/python-modules/aardwolf/default.nix +++ b/pkgs/development/python-modules/aardwolf/default.nix @@ -6,6 +6,7 @@ , asyauth , asysocks , buildPythonPackage +, cargo , colorama , fetchFromGitHub , iconv @@ -14,6 +15,7 @@ , pyperclip , pythonOlder , rustPlatform +, rustc , setuptools-rust , tqdm , unicrypto @@ -46,10 +48,9 @@ buildPythonPackage rec { nativeBuildInputs = [ rustPlatform.cargoSetupHook setuptools-rust - ] ++ (with rustPlatform.rust; [ cargo rustc - ]); + ]; propagatedBuildInputs = [ arc4 diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix index d0084146003cf..f0e23e713c3a1 100644 --- a/pkgs/development/python-modules/bcrypt/default.nix +++ b/pkgs/development/python-modules/bcrypt/default.nix @@ -1,6 +1,8 @@ { lib , buildPythonPackage +, cargo , rustPlatform +, rustc , setuptools , setuptools-rust , isPyPy @@ -41,11 +43,10 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools setuptools-rust - ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + cargo + rustc + ]; # Remove when https://github.com/NixOS/nixpkgs/pull/190093 lands. buildInputs = lib.optional stdenv.isDarwin libiconv; diff --git a/pkgs/development/python-modules/breezy/default.nix b/pkgs/development/python-modules/breezy/default.nix index 12f892b7e577d..3d0ad09857bcd 100644 --- a/pkgs/development/python-modules/breezy/default.nix +++ b/pkgs/development/python-modules/breezy/default.nix @@ -2,6 +2,7 @@ , stdenv , buildPythonPackage , fetchPypi +, cargo , configobj , cython , dulwich @@ -18,6 +19,7 @@ , pythonOlder , installShellFiles , rustPlatform +, rustc , setuptools-gettext , setuptools-rust , testers @@ -49,8 +51,8 @@ buildPythonPackage rec { cython installShellFiles rustPlatform.cargoSetupHook - rustPlatform.rust.cargo - rustPlatform.rust.rustc + cargo + rustc setuptools-gettext setuptools-rust ]; diff --git a/pkgs/development/python-modules/cryptg/default.nix b/pkgs/development/python-modules/cryptg/default.nix index ab59963519960..52fec2afc231a 100644 --- a/pkgs/development/python-modules/cryptg/default.nix +++ b/pkgs/development/python-modules/cryptg/default.nix @@ -3,7 +3,9 @@ , buildPythonPackage , fetchFromGitHub , pythonOlder +, cargo , rustPlatform +, rustc , setuptools-rust , libiconv }: @@ -27,11 +29,11 @@ buildPythonPackage rec { hash = "sha256-AqSVFOB9Lfvk9h3GtoYlEOXBEt7YZYLhCDNKM9upQ2U="; }; - nativeBuildInputs = with rustPlatform;[ + nativeBuildInputs = [ setuptools-rust - cargoSetupHook - rust.rustc - rust.cargo + rustPlatform.cargoSetupHook + rustc + cargo ]; buildInputs = lib.optionals stdenv.isDarwin [ diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index ef4220a42b7d0..199cfd86517f3 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -4,6 +4,8 @@ , buildPythonPackage , fetchPypi , rustPlatform +, cargo +, rustc , setuptools-rust , openssl , Security @@ -58,7 +60,9 @@ buildPythonPackage rec { ] ++ [ rustPlatform.cargoSetupHook setuptools-rust - ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]); + cargo + rustc + ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ] diff --git a/pkgs/development/python-modules/etebase/default.nix b/pkgs/development/python-modules/etebase/default.nix index f12fd2b5ca70f..15815f33ee4fd 100644 --- a/pkgs/development/python-modules/etebase/default.nix +++ b/pkgs/development/python-modules/etebase/default.nix @@ -3,7 +3,9 @@ , fetchFromGitHub , buildPythonPackage , rustPlatform +, cargo , pkg-config +, rustc , rustfmt , setuptools-rust , openssl @@ -34,11 +36,10 @@ buildPythonPackage rec { pkg-config rustfmt setuptools-rust - ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + cargo + rustc + ]; buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/development/python-modules/gb-io/default.nix b/pkgs/development/python-modules/gb-io/default.nix index bd5dd2cab1f2a..930aafc5ebf3f 100644 --- a/pkgs/development/python-modules/gb-io/default.nix +++ b/pkgs/development/python-modules/gb-io/default.nix @@ -3,6 +3,8 @@ , fetchFromGitHub , buildPythonPackage , rustPlatform +, cargo +, rustc , setuptools-rust , unittestCheckHook }: @@ -26,11 +28,12 @@ buildPythonPackage rec { sourceRoot = "source"; - nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + nativeBuildInputs = [ + setuptools-rust + rustPlatform.cargoSetupHook + cargo + rustc + ]; nativeCheckInputs = [ unittestCheckHook ]; diff --git a/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix b/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix index 1bcfe740952f0..513bf89cfc04d 100644 --- a/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix +++ b/pkgs/development/python-modules/json-stream-rs-tokenizer/default.nix @@ -2,6 +2,8 @@ , buildPythonPackage , fetchFromGitHub , rustPlatform +, cargo +, rustc , setuptools-rust , json-stream-rs-tokenizer , json-stream @@ -31,12 +33,10 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-rust - ] - ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + cargo + rustc + ]; # Tests depend on json-stream, which depends on this package. # To avoid infinite recursion, we only enable tests when building passthru.tests. diff --git a/pkgs/development/python-modules/libcst/default.nix b/pkgs/development/python-modules/libcst/default.nix index 8fef5c7151b21..6f3f2d3def64d 100644 --- a/pkgs/development/python-modules/libcst/default.nix +++ b/pkgs/development/python-modules/libcst/default.nix @@ -2,6 +2,7 @@ , stdenv , buildPythonPackage , fetchFromGitHub +, cargo , hypothesis , libiconv , pytestCheckHook @@ -9,6 +10,7 @@ , pythonOlder , pyyaml , rustPlatform +, rustc , setuptools-rust , setuptools-scm , typing-extensions @@ -50,7 +52,9 @@ buildPythonPackage rec { setuptools-rust setuptools-scm rustPlatform.cargoSetupHook - ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]); + cargo + rustc + ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; diff --git a/pkgs/development/python-modules/qiskit-terra/default.nix b/pkgs/development/python-modules/qiskit-terra/default.nix index e46e706c86575..cade2325c61f2 100644 --- a/pkgs/development/python-modules/qiskit-terra/default.nix +++ b/pkgs/development/python-modules/qiskit-terra/default.nix @@ -3,7 +3,9 @@ , pythonOlder , buildPythonPackage , fetchFromGitHub +, cargo , rustPlatform +, rustc # Python requirements , dill , numpy @@ -67,7 +69,7 @@ buildPythonPackage rec { hash = "sha256-imktzBpgP+lq6FsVWIUK82+t76gKTgt53kPfKOnsseQ="; }; - nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ rust.rustc rust.cargo cargoSetupHook ]); + nativeBuildInputs = [ setuptools-rust rustc cargo rustPlatform.cargoSetupHook ]; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; diff --git a/pkgs/development/python-modules/rtoml/default.nix b/pkgs/development/python-modules/rtoml/default.nix index d59a988a10ee1..a7130a1019287 100644 --- a/pkgs/development/python-modules/rtoml/default.nix +++ b/pkgs/development/python-modules/rtoml/default.nix @@ -1,10 +1,12 @@ { lib , buildPythonPackage +, cargo , fetchFromGitHub , libiconv , pytestCheckHook , pythonOlder , rustPlatform +, rustc , setuptools-rust }: @@ -29,9 +31,9 @@ buildPythonPackage rec { nativeBuildInputs = with rustPlatform; [ setuptools-rust - rust.rustc - rust.cargo - cargoSetupHook + rustc + cargo + rustPlatform.cargoSetupHook ]; buildInputs = [ diff --git a/pkgs/development/python-modules/rustworkx/default.nix b/pkgs/development/python-modules/rustworkx/default.nix index 09f15fdc1c94c..9054cb14d2784 100644 --- a/pkgs/development/python-modules/rustworkx/default.nix +++ b/pkgs/development/python-modules/rustworkx/default.nix @@ -1,6 +1,8 @@ { fetchFromGitHub , buildPythonPackage +, cargo , rustPlatform +, rustc , setuptools-rust , numpy , fixtures @@ -26,11 +28,12 @@ buildPythonPackage rec { hash = "sha256-imhiPj763iumRQb+oeBOpICD1nCvzZx+3yQWu1QRRQQ="; }; - nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + nativeBuildInputs = [ + setuptools-rust + rustPlatform.cargoSetupHook + cargo + rustc + ]; buildInputs = [ numpy ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; diff --git a/pkgs/development/python-modules/safetensors/default.nix b/pkgs/development/python-modules/safetensors/default.nix index 407dc5bebbe8d..c268dad920304 100644 --- a/pkgs/development/python-modules/safetensors/default.nix +++ b/pkgs/development/python-modules/safetensors/default.nix @@ -1,12 +1,14 @@ { stdenv , lib , buildPythonPackage +, cargo , fetchFromGitHub , fetchpatch , h5py , numpy , pythonOlder , pytestCheckHook +, rustc , rustPlatform , setuptools-rust , torch @@ -45,11 +47,11 @@ buildPythonPackage rec { sourceRoot = "source/bindings/python"; - nativeBuildInputs = with rustPlatform; [ + nativeBuildInputs = [ setuptools-rust - rust.cargo - rust.rustc - cargoSetupHook + cargo + rustc + rustPlatform.cargoSetupHook ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; diff --git a/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix b/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix index 31730d6ff2dc7..3a82ef799255d 100644 --- a/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix +++ b/pkgs/development/python-modules/setuptools-rust/pyo3-test/default.nix @@ -1,5 +1,7 @@ { callPackage +, cargo , rustPlatform +, rustc , setuptools-rust }: @@ -11,11 +13,11 @@ callPackage ../../../tools/rust/maturin/pyo3-test/generic.nix { # format = "setuptools"; - nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + nativeBuildInputs = [ setuptools-rust ] ++ [ + rustPlatform.cargoSetupHook + cargo + rustc + ]; preConfigure = '' # sourceRoot puts Cargo.lock in the wrong place due to the diff --git a/pkgs/development/python-modules/skytemple-rust/default.nix b/pkgs/development/python-modules/skytemple-rust/default.nix index e894dec0dec0e..47bbf831afda2 100644 --- a/pkgs/development/python-modules/skytemple-rust/default.nix +++ b/pkgs/development/python-modules/skytemple-rust/default.nix @@ -1,10 +1,12 @@ { lib , stdenv , buildPythonPackage +, cargo , fetchFromGitHub , libiconv , Foundation , rustPlatform +, rustc , setuptools-rust , range-typed-integers }: @@ -27,7 +29,7 @@ buildPythonPackage rec { }; buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ]; - nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]); + nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ]; propagatedBuildInputs = [ range-typed-integers ]; GETTEXT_SYSTEM = true; diff --git a/pkgs/development/python-modules/spacy-alignments/default.nix b/pkgs/development/python-modules/spacy-alignments/default.nix index d6081b4863278..ff6e0eff1f043 100644 --- a/pkgs/development/python-modules/spacy-alignments/default.nix +++ b/pkgs/development/python-modules/spacy-alignments/default.nix @@ -1,10 +1,12 @@ { lib , stdenv +, cargo , fetchPypi , fetchpatch , buildPythonPackage , isPy3k , rustPlatform +, rustc , setuptools-rust , libiconv }: @@ -28,11 +30,10 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-rust - ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + cargo + rustc + ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; diff --git a/pkgs/development/python-modules/tiktoken/default.nix b/pkgs/development/python-modules/tiktoken/default.nix index 654cea0839e79..13eaecc0fb4de 100644 --- a/pkgs/development/python-modules/tiktoken/default.nix +++ b/pkgs/development/python-modules/tiktoken/default.nix @@ -4,6 +4,8 @@ , fetchPypi , pythonOlder , rustPlatform +, cargo +, rustc , setuptools-rust , libiconv , requests @@ -40,7 +42,9 @@ buildPythonPackage { nativeBuildInputs = [ rustPlatform.cargoSetupHook setuptools-rust - ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]); + cargo + rustc + ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; diff --git a/pkgs/development/python-modules/tokenizers/default.nix b/pkgs/development/python-modules/tokenizers/default.nix index 3f85893ad7c1d..a94a1205e123f 100644 --- a/pkgs/development/python-modules/tokenizers/default.nix +++ b/pkgs/development/python-modules/tokenizers/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , buildPythonPackage +, cargo , datasets , fetchFromGitHub , fetchurl @@ -12,6 +13,7 @@ , pythonOlder , requests , rustPlatform +, rustc , Security , setuptools-rust }: @@ -82,11 +84,10 @@ buildPythonPackage rec { nativeBuildInputs = [ pkg-config setuptools-rust - ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + cargo + rustc + ]; buildInputs = [ openssl diff --git a/pkgs/development/python-modules/wasmer/default.nix b/pkgs/development/python-modules/wasmer/default.nix index 0fbd9d2f8d7de..3cf2ad0e73e49 100644 --- a/pkgs/development/python-modules/wasmer/default.nix +++ b/pkgs/development/python-modules/wasmer/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , rustPlatform +, rustc , callPackage , fetchFromGitHub , buildPythonPackage @@ -93,7 +94,7 @@ rec { pname = "wasmer-compiler-llvm"; buildAndTestSubdir = "packages/compiler-llvm"; cargoHash = "sha256-xawbf5gXXV+7I2F2fDSaMvjtFvGDBtqX7wL3c28TSbA="; - extraNativeBuildInputs = [ rustPlatform.rust.rustc.llvm ]; + extraNativeBuildInputs = [ rustc.llvm ]; extraBuildInputs = [ libffi libxml2.out ncurses zlib ]; }; diff --git a/pkgs/development/python-modules/watchfiles/default.nix b/pkgs/development/python-modules/watchfiles/default.nix index bbf8a71cb4b25..b644571b9e3f0 100644 --- a/pkgs/development/python-modules/watchfiles/default.nix +++ b/pkgs/development/python-modules/watchfiles/default.nix @@ -2,8 +2,10 @@ , stdenv , anyio , buildPythonPackage +, cargo , fetchFromGitHub , rustPlatform +, rustc , setuptools-rust , pythonOlder , dirty-equals @@ -41,12 +43,11 @@ buildPythonPackage rec { ]; nativeBuildInputs = [ - ] ++ (with rustPlatform; [ - cargoSetupHook - maturinBuildHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + cargo + rustc + ]; propagatedBuildInputs = [ anyio diff --git a/pkgs/development/python-modules/y-py/default.nix b/pkgs/development/python-modules/y-py/default.nix index f3c681eb4f885..accb1844b4c6d 100644 --- a/pkgs/development/python-modules/y-py/default.nix +++ b/pkgs/development/python-modules/y-py/default.nix @@ -3,6 +3,8 @@ , buildPythonPackage , fetchPypi , rustPlatform +, cargo +, rustc , libiconv , pytestCheckHook }: @@ -24,11 +26,11 @@ buildPythonPackage rec { hash = "sha256-tpUDGBIHqXsKPsK+1h2sNuiV2I0pGVBokKh+hdFazRQ="; }; - nativeBuildInputs = with rustPlatform; [ - cargoSetupHook - maturinBuildHook - rust.cargo - rust.rustc + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + cargo + rustc ]; buildInputs = lib.optional stdenv.isDarwin libiconv; diff --git a/pkgs/development/tools/ashpd-demo/default.nix b/pkgs/development/tools/ashpd-demo/default.nix index 2103d74e072a3..c489eddd11745 100644 --- a/pkgs/development/tools/ashpd-demo/default.nix +++ b/pkgs/development/tools/ashpd-demo/default.nix @@ -2,9 +2,11 @@ , lib , fetchFromGitHub , nix-update-script +, cargo , meson , ninja , rustPlatform +, rustc , pkg-config , glib , libshumate @@ -44,9 +46,9 @@ stdenv.mkDerivation rec { meson ninja pkg-config - rustPlatform.rust.cargo + cargo rustPlatform.cargoSetupHook - rustPlatform.rust.rustc + rustc wrapGAppsHook4 rustPlatform.bindgenHook desktop-file-utils diff --git a/pkgs/development/tools/build-managers/corrosion/default.nix b/pkgs/development/tools/build-managers/corrosion/default.nix index 0907923e6fcd8..e4084051fabc4 100644 --- a/pkgs/development/tools/build-managers/corrosion/default.nix +++ b/pkgs/development/tools/build-managers/corrosion/default.nix @@ -1,8 +1,10 @@ { lib , stdenv , fetchFromGitHub +, cargo , cmake , rustPlatform +, rustc , libiconv }: @@ -30,11 +32,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake - ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + cargo + rustc + ]; meta = with lib; { description = "Tool for integrating Rust into an existing CMake project"; diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix index 8e7bba4d00e8b..1863132405711 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides/default.nix @@ -212,7 +212,7 @@ lib.composeManyExtensions [ nativeBuildInputs = with pkgs; (old.nativeBuildInputs or [ ]) ++ lib.optionals (lib.versionAtLeast old.version "4") - (with pkgs.rustPlatform; [ rust.rustc rust.cargo cargoSetupHook self.setuptools-rust ]); + [ rustc cargo rustPlatform.cargoSetupHook self.setuptools-rust ]; } // lib.optionalAttrs (lib.versionAtLeast old.version "4") { cargoDeps = pkgs.rustPlatform.fetchCargoTarball @@ -402,7 +402,7 @@ lib.composeManyExtensions [ ++ lib.optionals (lib.versionAtLeast old.version "3.4") [ self.setuptools-rust ] ++ lib.optional (!self.isPyPy) pyBuildPackages.cffi ++ lib.optional (lib.versionAtLeast old.version "3.5" && !isWheel) - (with pkgs.rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]) + (with pkgs; [ rustPlatform.cargoSetupHook cargo rustc ]) ++ [ pkg-config ] ; buildInputs = (old.buildInputs or [ ]) diff --git a/pkgs/development/tools/watchman/default.nix b/pkgs/development/tools/watchman/default.nix index c68683dbecb02..33db2dd144d1f 100644 --- a/pkgs/development/tools/watchman/default.nix +++ b/pkgs/development/tools/watchman/default.nix @@ -1,4 +1,5 @@ { boost +, cargo , cmake , config , CoreServices @@ -25,6 +26,7 @@ , pkg-config , python3 , rustPlatform +, rustc , stateDir ? "/tmp" , stdenv , wangle @@ -56,11 +58,10 @@ stdenv.mkDerivation rec { cmake pkg-config ensureNewerSourcesForZipFilesHook - ] ++ (with rustPlatform; [ - cargoSetupHook - rust.cargo - rust.rustc - ]); + rustPlatform.cargoSetupHook + cargo + rustc + ]; buildInputs = [ pcre |