summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch
diff options
context:
space:
mode:
authorDaniël de Kok <me@danieldk.eu>2019-09-08 08:18:09 +0200
committerDaniël de Kok <me@danieldk.eu>2019-09-08 19:17:52 +0200
commit85c6d720117f8207ba561804980b2452755170b8 (patch)
tree49ecd47e954d648950e4cfd6b97622f5667e4e0f /pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch
parent57b66eb3f2a0e824c48759f2729370b1b9fd7660 (diff)
buildRustCrate: add support for renaming crates
Before this change, buildRustCrate always called rustc with --extern libName=[...]libName[...] However, Cargo permits using a different name under which a dependency is known to a crate. For example, rand 0.7.0 uses: [dependencies] getrandom_package = { version = "0.1.1", package = "getrandom", optional = true } Which introduces the getrandom dependency such that it is known as getrandom_package to the rand crate. In this case, the correct extern flag is of the form --extern getrandom_package=[...]getrandom[...] which is currently not supported. In order to support such cases, this change introduces a crateRenames argument to buildRustCrate. This argument is an attribute set of dependencies that should be renamed. In this case, crateRenames would be: { "getrandom" = "getrandom_package"; } The extern options are then built such that if the libName occurs as an attribute in this set, it value will be used as the local name. Otherwise libName will be used as before.
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch')
0 files changed, 0 insertions, 0 deletions