summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/GitPython/hardcode-git-path.patch
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2018-09-06 15:03:13 +0200
committerAndreas Rammhold <andreas@rammhold.de>2018-09-13 20:28:39 +0200
commit0c50140da5bcc55c588ac64bfcedac4699a43711 (patch)
tree9129a962ea5611f2d5f5f94d5f169974692bdb4a /pkgs/development/python-modules/GitPython/hardcode-git-path.patch
parentee21f64f6a6c555418905288a5ee2c072531d4f9 (diff)
buildRustCrate: add heuristic to picking the right source files
Cargo has a few odd (old) ways of picking source files if the `bin.path` attribute isn't given in the Cargo.toml. This commit adds support for some of those. The previous behaviour always defaulted to `src/main.rs` which was not always the right choice. Since there is look-ahead into the unpacked sources before running the actual builder the path selection logic has to be embedded within the build script. `buildRustCrate` currently supports two ways of running building binaries when processing a crate: - Explicit definition of all the binaries (& optionally the paths to their respective `main.rs`) and, - if not binary was explictly configured all files matching the patterns `src/main.rs`, `src/bin/*.rs`. When the explicit list is given without path information paths are now being picked from a list of candidates. The first match wins. The order is the same as within the cargo compatibility code. If the crate does not provide any libraries the path `src/{bin_name}.rs` is also considered. All underscores within the binary names are translated into dashes (`-`) before the lookups are made. This seems to be a common convention.
Diffstat (limited to 'pkgs/development/python-modules/GitPython/hardcode-git-path.patch')
0 files changed, 0 insertions, 0 deletions