mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
fetch-cargo-tarball: fix for packages without dep
This commit is contained in:
parent
656e3022f4
commit
51a6ac79d2
@ -13,7 +13,9 @@ def quote(s: str) -> str:
|
||||
def main() -> None:
|
||||
data = toml.load(sys.stdin)
|
||||
|
||||
assert list(data.keys()) == ["source"]
|
||||
# There is no dependency to vendor in this project.
|
||||
if not list(data.keys()) == ["source"]:
|
||||
return
|
||||
|
||||
# this value is non deterministic
|
||||
data["source"]["vendored-sources"]["directory"] = "@vendor@"
|
||||
|
@ -71,6 +71,8 @@ in stdenv.mkDerivation ({
|
||||
|
||||
cargo vendor $name --respect-source-config | cargo-vendor-normalise > $CARGO_CONFIG
|
||||
|
||||
# Create an empty vendor directory when there is no dependency to vendor
|
||||
mkdir -p $name
|
||||
# Add the Cargo.lock to allow hash invalidation
|
||||
cp Cargo.lock.orig $name/Cargo.lock
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user