Merge pull request #114731 from danieldk/release-notes-cargo-hooks

nixos/rl-2105: add hookification of buildRustPackage

authored by danieldk.tngl.sh and committed by GitHub 158578de 1d0cd06d

+34
+34
nixos/doc/manual/release-notes/rl-2105.xml
··· 754 754 once during the time when the timer was inactive. 755 755 </para> 756 756 </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> 757 791 </itemizedlist> 758 792 </section> 759 793 </section>