Comparing changes
Open a pull request
base repository: NixOS/nixpkgs
base: aa3c504e2018
head repository: NixOS/nixpkgs
compare: e46f456d79ee
- 12 commits
- 7 files changed
- 6 contributors
Commits on Mar 28, 2020
-
buildRustCrate: remap the current build dir to / for (more) reproduci…
…ble builds (cherry picked from commit 56e11bc)
-
buildRustCrate: remove superfluous dependency overrides
By overriding each dependency on every level of the dependency tree we are creating a lot of unnecessary instances of the same derivation Looking at the output size of `nix-instantiate --trace-function-calls -vvvv …` and the execution time I got about a 10x improvement after applying this change. It was probably good intentions that lead to these overrides but in practice no tooling (that I know of) really needs this. `carnix` and `crate2nix` are fine without those overrides. Furthermore I believe that it is the job of the tooling around `buildRustCrate` to provide a coherent set of overrides. By not enforcing all of the overrides, debug flags, verbosity, … to be the same throughout the closure we also allow consumers to override specific aspects of the crates. Some (older?) crates might need different `crateOverrides` then newer crates with the same name. Currently such situations can not (easily) be implemented with the override in-place. (cherry picked from commit be5597f)
-
buildRustCrate: refactor colored logging
* Make errors include the crate name and make them much more prominent. * Move more code into lib.sh * Already source generated logging code and lib.sh in configure (cherry picked from commit 04e7462)
-
build-support/rust/buildRustCrate: Search for matching Cargo.toml in …
…sub directories This is what cargo does for git repositories. See related issues: * nix-community/crate2nix#53 * nix-community/crate2nix#33 (cherry picked from commit 8a6638d)
-
buildRustCrate: only link build deps into build script
According to the Cargo documentation: > The build script does not have access to the dependencies listed in > the dependencies or dev-dependencies section (they’re not built > yet!). Also, build dependencies are not available to the package > itself unless also explicitly added in the [dependencies] table. https://doc.rust-lang.org/cargo/reference/build-scripts.html This change separates linkage of regular dependencies and build dependencies. (cherry picked from commit ea6e048)
-
buildRustCrate: sort linker options in-place
(cherry picked from commit 412c72d)
-
buildRustCrate: fewer backslashes
This is a slight readability boost, I think. (cherry picked from commit 7533876)
-
buildRustCrate: don't sort link flags
Linkage order is significant and sorting can result in link errors. (cherry picked from commit d8b8537)
-
buildRustCrateTests: add regression test for link order
(cherry picked from commit 2f7fb1c)
Commits on Mar 29, 2020
-
buildRustCrateTests: Fix link order test on darwin
As it turns out Darwin does most of the things differently then "normal" systems. They are using a different shared library extension and require an obscure commandline parameter that has to be added to every build system out there. That issue seems to be with clang on Darwin as on Linux that flag isn't required to build the very same tests (when using clang). After adjusting these two details the tests are running fine on the darwin box that I was able to obtain. (cherry picked from commit c8de31b)
-
buildRustCrate: Add tests for checking files in outputs.
...and remove superfluous dependency files (*.d). ...and copy dSYM directories on Mac OS when in release=false mode. (cherry picked from commit 782b304)
Commits on Apr 3, 2020
-
Merge pull request #83601 from andir/20.03-buildRustCrate-fixes
[20.03] buildRustCrate fixes backports
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff aa3c504e2018...e46f456d79ee