diff --git a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix index 165b3414c6a3..169adcf2d43a 100644 --- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix @@ -6,6 +6,7 @@ , completeDeps , crateAuthors , crateDescription +, crateHomepage , crateFeatures , crateName , crateVersion @@ -91,12 +92,11 @@ in '' export CARGO_PKG_VERSION_MAJOR=${builtins.elemAt version 0} export CARGO_PKG_VERSION_MINOR=${builtins.elemAt version 1} export CARGO_PKG_VERSION_PATCH=${builtins.elemAt version 2} + export CARGO_PKG_VERSION_PRE="${versionPre}" + export CARGO_PKG_HOMEPAGE="${crateHomepage}" export NUM_JOBS=1 export RUSTC="rustc" export RUSTDOC="rustdoc" - if [[ -n "${versionPre}" ]]; then - export CARGO_PKG_VERSION_PRE="${versionPre}" - fi BUILD="" if [[ ! -z "${build}" ]] ; then diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix index 81e8a7ca0afa..acb2ee63cce4 100644 --- a/pkgs/build-support/rust/build-rust-crate/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/default.nix @@ -131,6 +131,7 @@ stdenv.mkDerivation (rec { crateVersion = crate.version; crateDescription = crate.description or ""; crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else []; + crateHomepage = crate.homepage or ""; crateType = if lib.attrByPath ["procMacro"] false crate then ["proc-macro"] else if lib.attrByPath ["plugin"] false crate then ["dylib"] else @@ -144,7 +145,7 @@ stdenv.mkDerivation (rec { inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription crateFeatures libName build workspace_member release libPath crateVersion extraLinkFlags extraRustcOpts - crateAuthors verbose colors target_os; + crateAuthors crateHomepage verbose colors target_os; }; buildPhase = buildCrate { inherit crateName dependencies