diff options
author | Pierre-Étienne Meunier <pe@pijul.org> | 2019-02-25 15:22:03 +0000 |
---|---|---|
committer | Pierre-Étienne Meunier <pe@pijul.org> | 2019-02-25 15:22:03 +0000 |
commit | 32e94c267449714b67fa062d65e677a468099097 (patch) | |
tree | 977fb6cc69bb95db872facf5011b8107a818a004 | |
parent | 0a63b6528b067661f66436a598a5f27aab78b216 (diff) |
buildRustCrate: adding the description field
-rw-r--r-- | pkgs/build-support/rust/build-rust-crate/configure-crate.nix | 2 | ||||
-rw-r--r-- | pkgs/build-support/rust/build-rust-crate/default.nix | 3 |
2 files changed, 4 insertions, 1 deletions
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 700dff8499f9..9f499e4f5e72 100644 --- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix @@ -5,6 +5,7 @@ , completeBuildDeps , completeDeps , crateAuthors +, crateDescription , crateFeatures , crateName , crateVersion @@ -69,6 +70,7 @@ in '' export CARGO_PKG_NAME=${crateName} export CARGO_PKG_VERSION=${crateVersion} export CARGO_PKG_AUTHORS="${authors}" + export CARGO_PKG_DESCRIPTION="${crateDescription}" export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name} export CARGO_CFG_TARGET_OS=${target_os} diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix index fd7b6ec7ddaf..81e8a7ca0afa 100644 --- a/pkgs/build-support/rust/build-rust-crate/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/default.nix @@ -129,6 +129,7 @@ stdenv.mkDerivation (rec { build = crate.build or ""; workspace_member = crate.workspace_member or "."; crateVersion = crate.version; + crateDescription = crate.description or ""; crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else []; crateType = if lib.attrByPath ["procMacro"] false crate then ["proc-macro"] else @@ -140,7 +141,7 @@ stdenv.mkDerivation (rec { extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_ ++ (lib.optional (edition != null) "--edition ${edition}"); configurePhase = configureCrate { - inherit crateName buildDependencies completeDeps completeBuildDeps + inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription crateFeatures libName build workspace_member release libPath crateVersion extraLinkFlags extraRustcOpts crateAuthors verbose colors target_os; |