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: ebb20a5356af
Choose a base ref
...
head repository: NixOS/nix
compare: f32a9b354dd9
Choose a head ref
  • 7 commits
  • 37 files changed
  • 1 contributor

Commits on Apr 7, 2020

  1. Backport libfetchers from the flakes branch

    This provides a pluggable mechanism for defining new fetchers. It adds
    a builtin function 'fetchTree' that generalizes existing fetchers like
    'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a
    set of attributes, e.g.
    
      fetchTree {
        type = "git";
        url = "https://example.org/repo.git";
        ref = "some-branch";
        rev = "abcdef...";
      }
    
    The existing fetchers are just wrappers around this. Note that the
    input attributes to fetchTree are the same as flake input
    specifications and flake lock file entries.
    
    All fetchers share a common cache stored in
    ~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching
    mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}).
    
    This also adds support for Git worktrees (c169ea5).
    edolstra committed Apr 7, 2020
    1
    Copy the full SHA
    462421d View commit details
    Browse the repository at this point in the history
  2. Add 'path' fetcher

    This fetchers copies a plain directory (i.e. not a Git/Mercurial
    repository) to the store (or does nothing if the path is already a
    store path).
    
    One use case is to pin the 'nixpkgs' flake used to build the current
    NixOS system, and prevent it from being garbage-collected, via a
    system registry entry like this:
    
      {
          "from": {
              "id": "nixpkgs",
              "type": "indirect"
          },
          "to": {
              "type": "path",
              "path": "/nix/store/rralhl3wj4rdwzjn16g7d93mibvlr521-source",
              "lastModified": 1585388205,
              "rev": "b0c285807d6a9f1b7562ec417c24fa1a30ecc31a"
          },
          "exact": true
      }
    
    Note the fake "lastModified" and "rev" attributes that ensure that the
    flake gives the same evaluation results as the corresponding
    Git/GitHub inputs.
    
    (cherry picked from commit 12f9379)
    edolstra committed Apr 7, 2020
    Copy the full SHA
    670feb0 View commit details
    Browse the repository at this point in the history
  3. Respect the narHash attribute in more input types

    (cherry picked from commit a6ff66b)
    edolstra committed Apr 7, 2020
    Copy the full SHA
    f58a9b0 View commit details
    Browse the repository at this point in the history
  4. PathInput: Add some methods

    (cherry picked from commit 78ad5b3)
    edolstra committed Apr 7, 2020
    Copy the full SHA
    a6dfa3c View commit details
    Browse the repository at this point in the history
  5. Add FIXME

    (cherry picked from commit 2f49453)
    edolstra committed Apr 7, 2020
    Copy the full SHA
    26aeeb7 View commit details
    Browse the repository at this point in the history
  6. Cleanup

    edolstra committed Apr 7, 2020
    Copy the full SHA
    cd39709 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #3459 from NixOS/fetchers

    Backport libfetchers from the flakes branch
    edolstra committed Apr 7, 2020
    Copy the full SHA
    f32a9b3 View commit details
    Browse the repository at this point in the history