8000 nh: validate nix features & version by NotAShelf · Pull Request #277 · nix-community/nh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;">
  • Notifications You must be signed in to change notification settings
  • Fork 53
  • nh: validate nix features & version #277

    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

    Merged
    merged 4 commits into from
    May 8, 2025
    Merged

    nh: validate nix features & version #277

    merged 4 commits into from
    May 8, 2025

    Conversation

    NotAShelf
    Copy link
    Collaborator

    Isolated from #258. We now check for a minimum Nix version (should be equal to nixVersions.latest from the stable branch) and required Nix features (flakes and nix-command) as a part of our startup checks, which previously only checked for NH_FLAKE or/and FLAKE being set. This also moves the checks out of main and to a dedicated module for future maintainability reasons.

    Closes #237

    @NotAShelf
    Copy link
    Collaborator Author

    @drupol (pinging as the other nh maintainer)

    This new change causes fixupPhase to fail during nix build because the testing sendbox does not have the required features check. Do you think we can set the required variables (or disable the check via NH_NO_CHECKS) only during build? env.NH_NO_CHECKS would do for suppressing the warning, but I believe that'll disable the functionality entirely even after build.

    @drupol
    Copy link
    drupol commented May 8, 2025

    Hello,

    I don't have a strong opinion on this yet, do what you think is better, and ping me when it's done, I'll have a look.

    @NotAShelf
    Copy link
    Collaborator Author

    Apparently the checks were failing because we ran installations in preFixup. Moving those to postInstall appears to have fixed the build fail.

    @NotAShelf NotAShelf merged commit d36ff53 into master May 8, 2025
    4 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    nh <cmd> repl does not work
    3 participants
    0