Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: aa3c504e2018
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: e46f456d79ee
Choose a head ref
  • 12 commits
  • 7 files changed
  • 6 contributors

Commits on Mar 28, 2020

  1. buildRustCrate: remap the current build dir to / for (more) reproduci…

    …ble builds
    
    (cherry picked from commit 56e11bc)
    andir committed Mar 28, 2020
    Copy the full SHA
    1febd68 View commit details
    Browse the repository at this point in the history
  2. 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)
    andir committed Mar 28, 2020
    Copy the full SHA
    be561c7 View commit details
    Browse the repository at this point in the history
  3. 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)
    kolloch authored and andir committed Mar 28, 2020
    Copy the full SHA
    7d8d24e View commit details
    Browse the repository at this point in the history
  4. 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)
    kolloch authored and andir committed Mar 28, 2020
    Copy the full SHA
    0965206 View commit details
    Browse the repository at this point in the history
  5. 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)
    danieldk authored and andir committed Mar 28, 2020
    Copy the full SHA
    ed3dc87 View commit details
    Browse the repository at this point in the history
  6. buildRustCrate: sort linker options in-place

    (cherry picked from commit 412c72d)
    danieldk authored and andir committed Mar 28, 2020
    Copy the full SHA
    fcb8dc7 View commit details
    Browse the repository at this point in the history
  7. buildRustCrate: fewer backslashes

    This is a slight readability boost, I think.
    
    (cherry picked from commit 7533876)
    alyssais authored and andir committed Mar 28, 2020
    Copy the full SHA
    eb7d450 View commit details
    Browse the repository at this point in the history
  8. buildRustCrate: don't sort link flags

    Linkage order is significant and sorting can result in link errors.
    
    (cherry picked from commit d8b8537)
    symphorien authored and andir committed Mar 28, 2020
    Copy the full SHA
    2597875 View commit details
    Browse the repository at this point in the history
  9. buildRustCrateTests: add regression test for link order

    (cherry picked from commit 2f7fb1c)
    symphorien authored and andir committed Mar 28, 2020
    Copy the full SHA
    9408b0c View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2020

  1. 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)
    andir committed Mar 29, 2020
    Copy the full SHA
    32cbd89 View commit details
    Browse the repository at this point in the history
  2. 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)
    kolloch authored and andir committed Mar 29, 2020
    Copy the full SHA
    040f611 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2020

  1. Merge pull request #83601 from andir/20.03-buildRustCrate-fixes

    [20.03] buildRustCrate fixes backports
    flokli committed Apr 3, 2020
    Copy the full SHA
    e46f456 View commit details
    Browse the repository at this point in the history