Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for subflakes #10089

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Commits on May 15, 2024

  1. Improve support for subflakes

    Subflakes are flakes in the same tree, accessed in flake inputs via
    relative paths (e.g. `inputs.foo.url = "path:./subdir"`). Previously
    these didn't work very well because they would be separately copied to
    the store, which is inefficient and makes references to parent
    directories tricky or impossible. Furthermore, they had their own NAR
    hash in the lock file, which is superfluous since the parent is
    already locked.
    
    Now subflakes are accessed via the accessor of the calling flake. This
    avoids the unnecessary copy and makes it possible for subflakes to
    depend on flakes in a parent directory (so long as they're in the same
    tree).
    
    Lock file nodes for relative flake inputs now have a new `parent` field:
    
      {
        "locked": {
          "path": "./subdir",
          "type": "path"
        },
        "original": {
          "path": "./subdir",
          "type": "path"
        },
        "parent": [
          "foo",
          "bar"
        ]
      }
    
    which denotes that `./subdir` is to be interpreted relative to the
    directory of the `bar` input of the `foo` input of the root flake.
    
    Extracted from the lazy-trees branch.
    edolstra committed May 15, 2024
    Configuration menu
    Copy the full SHA
    b2be6fe View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. call-flake.nix: Fix relative path resolution

    `parentNode.sourceInfo.outPath` does not include the subdir of the
    parent flake, while `parentNode.outPath` does. So we need to use the
    latter.
    edolstra committed May 17, 2024
    Configuration menu
    Copy the full SHA
    49f592d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3180671 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Configuration menu
    Copy the full SHA
    21fc07c View commit details
    Browse the repository at this point in the history
  2. shellcheck

    edolstra committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    09d7197 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    71d4bb8 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Configuration menu
    Copy the full SHA
    91e7d49 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. tests/functional/flakes/relative-paths.sh: Fix build failure in hydra…

    …Jobs.tests.functional_user
    edolstra committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f206325 View commit details
    Browse the repository at this point in the history