git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #114731 from danieldk/release-notes-cargo-hooks

nixos/rl-2105: add hookification of buildRustPackage

commit158578de40d9ca117f7e69d80eeb28e8dac583fe authorDaniël de Kok <me@danieldk.eu> dateSat 6 Mar 2021, 11:49 (6 years ago) parent1d0cd063faea84
1 file changed+34
nixos/doc/manual/release-notes/rl-2105.xml+34
nixos/doc/manual/release-notes/rl-2105.xml+34
@@ -754,6 +754,40 @@ self: super:
754754 once during the time when the timer was inactive.
755755 </para>
756756 </listitem>
757+ <listitem>
758+ <para>
759+ The <literal>rustPlatform.buildRustPackage</literal> function is split into several hooks:
760+ <package>cargoSetupHook</package> to set up vendoring for Cargo-based projects,
761+ <package>cargoBuildHook</package> to build a project using Cargo,
762+ <package>cargoInstallHook</package> to install a project using Cargo, and
763+ <package>cargoCheckHook</package> to run tests in Cargo-based projects. With this change,
764+ mixed-language projects can use the relevant hooks within builders other than
765+ <literal>buildRustPackage</literal>. However, these changes also required several API changes to
766+ <literal>buildRustPackage</literal> itself:
767+
768+ <itemizedlist>
769+ <listitem>
770+ <para>
771+ The <literal>target</literal> argument was removed. Instead, <literal>buildRustPackage</literal>
772+ will always use the same target as the C/C++ compiler that is used.
773+ </para>
774+ </listitem>
775+ <listitem>
776+ <para>
777+ The <literal>cargoParallelTestThreads</literal> argument was removed. Parallel tests are
778+ now disabled through <literal>dontUseCargoParallelTests</literal>.
779+ </para>
780+ </listitem>
781+ </itemizedlist>
782+ </para>
783+ </listitem>
784+ <listitem>
785+ <para>
786+ The <literal>rustPlatform.maturinBuildHook</literal> hook was added. This hook can be used
787+ with <literal>buildPythonPackage</literal> to build Python packages that are written in Rust
788+ and use Maturin as their build tool.
789+ </para>
790+ </listitem>
757791 </itemizedlist>
758792 </section>
759793</section>