Skip to content

Commit 5c38beb

Browse files
committed
doc/rust: prefer pname+version over name in fetchCargoTarball
1 parent 3207bc2 commit 5c38beb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

doc/languages-frameworks/rust.section.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,7 @@ buildPythonPackage rec {
567567
};
568568
569569
cargoDeps = rustPlatform.fetchCargoTarball {
570-
inherit src sourceRoot;
571-
name = "${pname}-${version}";
570+
inherit pname version src sourceRoot;
572571
hash = "sha256-miW//pnOmww2i6SOGbkrAIdc/JMDT4FJLqdMFojZeoY=";
573572
};
574573
@@ -611,9 +610,8 @@ buildPythonPackage rec {
611610
};
612611
613612
cargoDeps = rustPlatform.fetchCargoTarball {
614-
inherit src;
613+
inherit pname version src;
615614
sourceRoot = "${pname}-${version}/${cargoRoot}";
616-
name = "${pname}-${version}";
617615
hash = "sha256-PS562W4L1NimqDV2H0jl5vYhL08H9est/pbIxSdYVfo=";
618616
};
619617
@@ -652,8 +650,7 @@ buildPythonPackage rec {
652650
};
653651
654652
cargoDeps = rustPlatform.fetchCargoTarball {
655-
inherit src;
656-
name = "${pname}-${version}";
653+
inherit pname version src;
657654
hash = "sha256-heOBK8qi2nuc/Ib+I/vLzZ1fUUD/G/KTw9d7M4Hz5O0=";
658655
};
659656
@@ -697,8 +694,7 @@ stdenv.mkDerivation rec {
697694
};
698695
699696
cargoDeps = rustPlatform.fetchCargoTarball {
700-
inherit src;
701-
name = "${pname}-${version}";
697+
inherit pname version src;
702698
hash = "sha256-8fa3fa+sFi5H+49B5sr2vYPkp9C9s6CcE0zv4xB8gww=";
703699
};
704700

0 commit comments

Comments
 (0)