buildRustCrate: adding the description field
This commit is contained in:
parent
0a63b6528b
commit
32e94c2674
@ -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}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user