a66bca1520
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
15 lines
344 B
Nix
15 lines
344 B
Nix
{ lib, fetchzip }:
|
|
|
|
{ crateName ? args.pname
|
|
, pname ? null
|
|
, version
|
|
, ...
|
|
} @ args:
|
|
|
|
assert pname == null || pname == crateName;
|
|
|
|
fetchzip ({
|
|
name = "${crateName}-${version}.tar.gz";
|
|
url = "https://crates.io/api/v1/crates/${crateName}/${version}/download";
|
|
extension = "tar.gz";
|
|
} // removeAttrs args [ "crateName" "pname" "version" ])
|