mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
Merge pull request #56353 from P-E-Meunier/buildRustCrate
buildRustCrate: adding the description field
This commit is contained in:
commit
c3a3ae1961
2 changed files with 4 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
, completeBuildDeps
|
, completeBuildDeps
|
||||||
, completeDeps
|
, completeDeps
|
||||||
, crateAuthors
|
, crateAuthors
|
||||||
|
, crateDescription
|
||||||
, crateFeatures
|
, crateFeatures
|
||||||
, crateName
|
, crateName
|
||||||
, crateVersion
|
, crateVersion
|
||||||
|
@ -69,6 +70,7 @@ in ''
|
||||||
export CARGO_PKG_NAME=${crateName}
|
export CARGO_PKG_NAME=${crateName}
|
||||||
export CARGO_PKG_VERSION=${crateVersion}
|
export CARGO_PKG_VERSION=${crateVersion}
|
||||||
export CARGO_PKG_AUTHORS="${authors}"
|
export CARGO_PKG_AUTHORS="${authors}"
|
||||||
|
export CARGO_PKG_DESCRIPTION="${crateDescription}"
|
||||||
|
|
||||||
export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name}
|
export CARGO_CFG_TARGET_ARCH=${stdenv.hostPlatform.parsed.cpu.name}
|
||||||
export CARGO_CFG_TARGET_OS=${target_os}
|
export CARGO_CFG_TARGET_OS=${target_os}
|
||||||
|
|
|
@ -129,6 +129,7 @@ stdenv.mkDerivation (rec {
|
||||||
build = crate.build or "";
|
build = crate.build or "";
|
||||||
workspace_member = crate.workspace_member or ".";
|
workspace_member = crate.workspace_member or ".";
|
||||||
crateVersion = crate.version;
|
crateVersion = crate.version;
|
||||||
|
crateDescription = crate.description or "";
|
||||||
crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else [];
|
crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else [];
|
||||||
crateType =
|
crateType =
|
||||||
if lib.attrByPath ["procMacro"] false crate then ["proc-macro"] else
|
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}");
|
extraRustcOpts = (if crate ? extraRustcOpts then crate.extraRustcOpts else []) ++ extraRustcOpts_ ++ (lib.optional (edition != null) "--edition ${edition}");
|
||||||
|
|
||||||
configurePhase = configureCrate {
|
configurePhase = configureCrate {
|
||||||
inherit crateName buildDependencies completeDeps completeBuildDeps
|
inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
|
||||||
crateFeatures libName build workspace_member release libPath crateVersion
|
crateFeatures libName build workspace_member release libPath crateVersion
|
||||||
extraLinkFlags extraRustcOpts
|
extraLinkFlags extraRustcOpts
|
||||||
crateAuthors verbose colors target_os;
|
crateAuthors verbose colors target_os;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue