Skip to content

nix: fix build when overriding inputs#1718

Merged
pazz merged 4 commits into
masterfrom
nix-stuff
Jun 2, 2026
Merged

nix: fix build when overriding inputs#1718
pazz merged 4 commits into
masterfrom
nix-stuff

Conversation

@lucc

@lucc lucc commented May 31, 2026

Copy link
Copy Markdown
Collaborator

I had the case in #1715 that I wanted to build alot with an update version of nixpkgs. But our code to compute the version did not evaluate for that.

lucc added 2 commits May 31, 2026 14:17
If we use --override-input the shortRev and dirtyShortRev attribute on
the flake both seem to be unset.  We use a simple default string in that
case to compute the version string for the alot package.

@lucc lucc left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pazz I think that you did not use nix so this might be difficult for you to test/review.

But I can not approve my own PR, so what do you think is the best course of action here?

@pazz

pazz commented Jun 1, 2026

Copy link
Copy Markdown
Owner

let's wait for a copilot review, then amend/ignore it, and you can merge?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Nix flake to make version computation resilient when the flake is built with overridden inputs (e.g., different nixpkgs), and refreshes the CI Nix installer action.

Changes:

  • Compute a version once at the flake output level with a fallback when shortRev/dirtyShortRev are unavailable.
  • Refactor the Nix packaging to build a Python package (buildPythonPackage) and then produce an application via toPythonApplication, plus add a theme-test package.
  • Bump cachix/install-nix-action used in CI.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
flake.nix Adjusts version derivation logic and refactors Python/Nix packaging; adds a theme-test derivation.
.github/workflows/check.yml Updates the GitHub Action used to install Nix during CI jobs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flake.nix
Comment thread flake.nix
@lucc

lucc commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

@pazz yes I can merge in theory but only if the PR has one approving review (not from me if I am the author). That is the branch protection rule for master. And that was the reason for calling out to you here in the first place. I think I need the approval from you (as we are the only people with commit rights, no?)

@pazz pazz merged commit 7ffa447 into master Jun 2, 2026
27 checks passed
@pazz

pazz commented Jun 2, 2026

Copy link
Copy Markdown
Owner

here we go :) thanks

@lucc lucc deleted the nix-stuff branch June 2, 2026 15:49
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.

3 participants