8000 merge queue: embarking main (bfd2857) and #659 together by mergify[bot] · Pull Request #660 · nix-community/nix-init · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lang/rust/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub async fn cargo_deps_hash(
if has_cargo_lock {
let (hash, _) = tokio::join!(
fod_hash(format!(
r#"(import({nixpkgs}){{}}).rustPlatform.fetchCargoTarball{{name="{pname}-{version}";src={src};hash="{FAKE_HASH}";}}"#,
r#"(import({nixpkgs}){{}}).rustPlatform.fetchCargoVendor{{pname="{pname}";version="{version}";src={src};hash="{FAKE_HASH}";}}"#,
)),
async {
if let Some(lock) = resolve_workspace(src_dir) {
Expand Down
10 changes: 4 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,8 @@ async fn run() -> Result<()> {
RustVendorData::Hash(hash) => {
write!(out, " ")?;
writedoc! {out, r#"
cargoDeps = rustPlatform.fetchCargoTarball {{
inherit src;
name = "${{pname}}-${{version}}";
cargoDeps = rustPlatform.fetchCargoVendor {{
inherit pname version src;
hash = "{hash}";
}};

Expand Down Expand Up @@ -773,9 +772,8 @@ async fn run() -> Result<()> {

src = {src_expr};

cargoDeps = rustPlatform.fetchCargoTarball {{
inherit src;
name = "${{pname}}-${{version}}";
cargoDeps = rustPlatform.fetchCargoVendor {{
inherit pname version src;
hash = "{hash}";
}};

Expand Down
0