From 3faea849b9bc72da2c07be3b2d977aaa323af7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Mon, 1 Mar 2021 08:57:35 +0100 Subject: [PATCH] nixos/rl-2105: add hookification of buildRustPackage --- nixos/doc/manual/release-notes/rl-2105.xml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml index 6a0eb13eac9c..63e91f96cfaf 100644 --- a/nixos/doc/manual/release-notes/rl-2105.xml +++ b/nixos/doc/manual/release-notes/rl-2105.xml @@ -745,6 +745,40 @@ self: super: once during the time when the timer was inactive. + + + The rustPlatform.buildRustPackage function is split into several hooks: + cargoSetupHook to set up vendoring for Cargo-based projects, + cargoBuildHook to build a project using Cargo, + cargoInstallHook to install a project using Cargo, and + cargoCheckHook to run tests in Cargo-based projects. With this change, + mixed-language projects can use the relevant hooks within builders other than + buildRustPackage. However, these changes also required several API changes to + buildRustPackage itself: + + + + + The target argument was removed. Instead, buildRustPackage + will always use the same target as the C/C++ compiler that is used. + + + + + The cargoParallelTestThreads argument was removed. Parallel tests are + now disabled through dontUseCargoParallelTests. + + + + + + + + The rustPlatform.maturinBuildHook hook was added. This hook can be used + with buildPythonPackage to build Python packages that are written in Rust + and use Maturin as their build tool. + +