buildRustCrate: reflow the way `extraRustcOpts` is constructed

This should make it more obvious that we have three parts to it and not
just one long gibberish string that makes up all of it.
wip/yesman
Andreas Rammhold 5 years ago
parent d37f001164
commit 5ad83267ed
No known key found for this signature in database
GPG Key ID: E432E410B5E48C86
  1. 5
      pkgs/build-support/rust/build-rust-crate/default.nix

@ -126,7 +126,10 @@ stdenv.mkDerivation (rec {
colors = lib.attrByPath [ "colors" ] "always" crate;
extraLinkFlags = lib.concatStringsSep " " (crate.extraLinkFlags or []);
edition = crate.edition or null;
extraRustcOpts = lib.optionals (crate ? extraRustcOpts) crate.extraRustcOpts ++ extraRustcOpts_ ++ (lib.optional (edition != null) "--edition ${edition}");
extraRustcOpts =
lib.optionals (crate ? extraRustcOpts) crate.extraRustcOpts
++ extraRustcOpts_
++ (lib.optional (edition != null) "--edition ${edition}");
configurePhase = configureCrate {
inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription

Loading…
Cancel
Save