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: c15a85829e2b^
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 308d3df5416d
Choose a head ref
  • 12 commits
  • 17 files changed
  • 2 contributors

Commits on May 12, 2015

  1. ===== RG: r/upd-rust =====

    wizeman committed May 12, 2015
    Copy the full SHA
    c15a858 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    0fcdf5a View commit details
    Browse the repository at this point in the history
  3. fetchgit: Add support for specifying branch name

    This is useful when `leaveDotGit = true` and some other derivation
    expects some branch name to exist.
    
    Previously, `nix-prefetch-git` always created a branch with a
    hard-coded name (`fetchgit`).
    wizeman committed May 12, 2015
    Copy the full SHA
    5a89531 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    4bc80bd View commit details
    Browse the repository at this point in the history
  5. cargo: Build optimized binary

    wizeman committed May 12, 2015
    Copy the full SHA
    5e6eb21 View commit details
    Browse the repository at this point in the history
  6. buildRustPackage: Add check phase and enable it by default

    Also disable check phase in cargo as there are lots of failures (some
    probably due to trying to access the network).
    wizeman committed May 12, 2015
    Copy the full SHA
    0962406 View commit details
    Browse the repository at this point in the history
  7. buildRustPackage: Fix Cargo.lock being ignored

    It turns out that `cargo`, with respect to registry dependencies, was
    ignoring the package versions locked in `Cargo.lock` because we changed
    the registry index URL.
    
    Therefore, every time `rustRegistry` would be updated, we'd always try
    to use the latest version available for every dependency and as a result
    the deps' SHA256 hashes would almost always have to be changed.
    
    To fix this, now we do a string substitution in `Cargo.lock` of the
    `crates.io` registry URL with our URL. This should be safe because our
    registry is just a copy of the `crates.io` registry at a certain point
    in time.
    
    Since now we don't always use the latest version of every dependency,
    the build of `cargo` actually started to fail because two of the
    dependencies specified in its `Cargo.lock` file have build failures.
    
    To fix the latter problem, I've added a `cargoUpdateHook` variable that
    gets ran both when fetching dependencies and just before building the
    program. The purpose of `cargoUpdateHook` is to do any ad-hoc updating
    of dependencies necessary to get the package to build. The use of the
    '--precise' flag is needed so that cargo doesn't try to fetch an even
    newer version whenever `rustRegistry` is updated (and therefore have to
    change depsSha256 as a consequence).
    wizeman committed May 12, 2015
    Copy the full SHA
    a82824c View commit details
    Browse the repository at this point in the history
  8. cargo: Remove setupHook

    Instead, move that code into buildRustPackage.
    
    The setup hook was only doing part of the work anyway, and having it in
    a separate place was obscuring what was really going on.
    wizeman committed May 12, 2015
    Copy the full SHA
    18941c7 View commit details
    Browse the repository at this point in the history
  9. buildRustPackage: Add a mechanism to patch registry deps

    ... in a more generic way.
    
    With this commit, if you need to patch a registry package to make it
    work with Nix, you just need to add a script to patch-registry-deps
    in the same style as the `pkg-config` script.
    wizeman committed May 12, 2015
    Copy the full SHA
    6cbc590 View commit details
    Browse the repository at this point in the history
  10. buildRustPackage: Get rid of /proc/self/cwd hack

    This makes buildRustPackage portable to non-Linux platforms.
    
    Additionally, now we also save the `Cargo.lock` file into the fetch output, so
    that we don't have to run $cargoUpdateHook again just before building.
    wizeman committed May 12, 2015
    Copy the full SHA
    8f4452b View commit details
    Browse the repository at this point in the history
  11. rustRegistry: Fix "Target OID..." cargo failure.

    For some reason, `cargo` doesn't like git repositories downloaded with
    `fetchgit`. It will sometimes fail with the error message "Target OID for
    the reference doesn't exist on the repository".
    
    To workaround this, we'll just have to create a new git repo from
    scratch...
    wizeman committed May 12, 2015
    Copy the full SHA
    6f480ac View commit details
    Browse the repository at this point in the history
  12. rustRegistry: Update

    wizeman committed May 12, 2015
    Copy the full SHA
    308d3df View commit details
    Browse the repository at this point in the history