diff options
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/rust/build-rust-crate/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix index 47a84e5ca2b8..fd7b6ec7ddaf 100644 --- a/pkgs/build-support/rust/build-rust-crate/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/default.nix @@ -71,7 +71,7 @@ let crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: {}) crateOverr processedAttrs = [ "src" "buildInputs" "crateBin" "crateLib" "libName" "libPath" "buildDependencies" "dependencies" "features" - "crateName" "version" "build" "authors" "colors" + "crateName" "version" "build" "authors" "colors" "edition" ]; extraDerivationAttrs = lib.filterAttrs (n: v: ! lib.elem n processedAttrs) crate; buildInputs_ = buildInputs; @@ -136,7 +136,9 @@ stdenv.mkDerivation (rec { (crate.type or ["lib"]); colors = lib.attrByPath [ "colors" ] "always" crate; extraLinkFlags = builtins.concatStringsSep " " (crate.extraLinkFlags or []); - extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_; + edition = crate.edition or null; + extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_ ++ (lib.optional (edition != null) "--edition ${edition}"); + configurePhase = configureCrate { inherit crateName buildDependencies completeDeps completeBuildDeps crateFeatures libName build workspace_member release libPath crateVersion |