Rust: Difference between revisions
imported>A-m-joseph Longer example, fixed the section title |
imported>A-m-joseph No edit summary |
||
Line 131: | Line 131: | ||
== Using overrideArgs with Rust Packages == | == Using overrideArgs with Rust Packages == | ||
This is a bit tricky, you can't just use <code>overrideArgs</code>. [https://discourse.nixos.org/t/is-it-possible-to-override-cargosha256-in-buildrustpackage/4393/3 Here] is one example of how to do it. The trick is to use two nested calls to <code>overrideAttrs</code>; the outer call overrides the <code>cargoDeps</code> attribute, the inner call | This is a bit tricky, you can't just use <code>overrideArgs</code>. [https://discourse.nixos.org/t/is-it-possible-to-override-cargosha256-in-buildrustpackage/4393/3 Here] is one example of how to do it. The trick is to use two nested calls to <code>overrideAttrs</code>; the outer call overrides the <code>cargoDeps</code> attribute, the inner call rebuilds the vendored tarball and provides the updated hash: | ||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> |