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/nix
base: daa7ba60b3ee^
Choose a base ref
...
head repository: NixOS/nix
compare: 159205ab2023
Choose a head ref
  • 9 commits
  • 18 files changed
  • 1 contributor

Commits on Jan 27, 2021

  1. Add a new Cmd type working on RealisedPaths

    Where a `RealisedPath` is a store path with its history, meaning either
    an opaque path for stuff that has been directly added to the store, or a
    `Realisation` for stuff that has been built by a derivation
    
    This is a low-level refactoring that doesn't bring anything by itself
    (except a few dozen extra lines of code :/ ), but raising the
    abstraction level a bit is important on a number of levels:
    
    - Commands like `nix build` have to query for the realisations after the
      build is finished which is fragile (see
      27905f1 for example). Having them
      oprate directly at the realisation level would avoid that
    - Others like `nix copy` currently operate directly on (built) store
      paths, but need a bit more information as they will need to register
      the realisations on the remote side
    thufschmitt committed Jan 27, 2021
    Copy the full SHA
    9fe4bf8 View commit details
    Browse the repository at this point in the history
  2. Don't crash nix-build when not all outputs are realised

    Change the `nix-build` logic for linking/printing the output paths to allow for
    some outputs to be missing. This might happen when the toplevel
    derivation didn't have to be built, either because all the required
    outputs were already there, or because they have all been substituted.
    thufschmitt committed Jan 27, 2021
    Copy the full SHA
    6a9837f View commit details
    Browse the repository at this point in the history
  3. Test the garbage collection of CA derivations

    Simple test to ensure that `nix-build && nix-collect-garbage &&
    nix-build -j0` works as it should
    thufschmitt committed Jan 27, 2021
    Copy the full SHA
    20228a0 View commit details
    Browse the repository at this point in the history
  4. Register the realisations for unresolved drvs

    Once a build is done, get back to the original derivation, and register
    all the newly built outputs for this derivation.
    
    This allows Nix to work properly with derivations that don't have all
    their build inputs available − thus allowing garbage collection and
    (once it's implemented) binary substitution
    thufschmitt committed Jan 27, 2021
    Copy the full SHA
    46b1a68 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    daa7ba6 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    8cd6652 View commit details
    Browse the repository at this point in the history
  7. Use RealisedPaths in copyPaths

    That way we can copy the realisations too (in addition to the store
    paths themselves)
    thufschmitt committed Jan 27, 2021
    Copy the full SHA
    3a527b2 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    9b136e4 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    159205a View commit details
    Browse the repository at this point in the history