Expose custom Rust registry versions
This allows users to specify a custom registry src, because currently every packager would need to create an outdated Cargo.lock just to be compatible with the probably outdated rustRegistry in nixpkgs. Currently there is no easy way to convince cargo to do that, so this makes that workaround unnecessary.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, cacert, git, rust, rustRegistry }:
|
||||
{ stdenv, callPackage, path, cacert, git, rust }:
|
||||
{ name, depsSha256
|
||||
, src ? null
|
||||
, srcs ? null
|
||||
@@ -8,9 +8,14 @@
|
||||
, cargoUpdateHook ? ""
|
||||
, cargoDepsHook ? ""
|
||||
, cargoBuildFlags ? []
|
||||
, registry ? null
|
||||
, ... } @ args:
|
||||
|
||||
let
|
||||
lib = stdenv.lib;
|
||||
rustRegistry = callPackage (path + /pkgs/top-level/rust-packages.nix)
|
||||
(lib.optionalAttrs (registry != null) { src = registry; });
|
||||
|
||||
fetchDeps = import ./fetchcargo.nix {
|
||||
inherit stdenv cacert git rust rustRegistry;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user