Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6e8c3775628a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c2e5ff3fe8e1
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jan 12, 2020

  1. doc: update rust example on buildRustPackage (#77534)

    The example in the manual was out of date and didn't use the newer `pname`
    convention, which simplifies the fetch call.
    bhipple authored and zimbatm committed Jan 12, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    c2e5ff3 View commit details
Showing with 11 additions and 7 deletions.
  1. +11 −7 doc/languages-frameworks/rust.section.md
18 changes: 11 additions & 7 deletions doc/languages-frameworks/rust.section.md
Original file line number Diff line number Diff line change
@@ -32,17 +32,17 @@ Rust applications are packaged by using the `buildRustPackage` helper from `rust

```
rustPlatform.buildRustPackage rec {
name = "ripgrep-${version}";
version = "0.4.0";
pname = "ripgrep";
version = "11.0.2";
src = fetchFromGitHub {
owner = "BurntSushi";
repo = "ripgrep";
rev = "${version}";
sha256 = "0y5d1n6hkw85jb3rblcxqas2fp82h3nghssa4xqrhqnz25l799pj";
repo = pname;
rev = version;
sha256 = "1iga3320mgi7m853la55xip514a3chqsdi1a1rwv25lr9b1p7vd3";
};
cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
cargoSha256 = "17ldqr3asrdcsh4l29m3b5r37r5d0b3npq1lrgjmxb6vlx6a36qh";
verifyCargoDeps = true;
meta = with stdenv.lib; {
@@ -66,7 +66,11 @@ added in `cargoPatches` will also be prepended to the patches in `patches` at
build-time.

When `verifyCargoDeps` is set to `true`, the build will also verify that the
`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future.
`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the
`cargoDeps` and `src`. Note that this option changes the value of `cargoSha256`
since it also copies the `Cargo.lock` in it. To avoid breaking
backward-compatibility this option is not enabled by default but hopefully will
be in the future.

### Building a crate for a different target