Skip to content

Conversation

@plaflamme
Copy link

This is based on #412 and is an answer to this comment

Notes:

  1. probably not the most idiomatic nix, but it works (try modifying one of the .py files and then running nix flake check --impure)
  2. had to use --impure argument, I'm not sure why the error kicks in (see 505cc01), but it complains about referencing builtins.storePath
  3. modified the GH action to simply invoke nix flake check --impure which also runs the pre-existing nix linting check
  4. did nix flake update to get a more recent ruff version (0.2.x -> 0.12.x which is pretty substantial)

cc @t184256

Had to add `--impure` to the call due to the following error otherwise:

```
error:
       … while checking flake output 'packages'
         at /nix/store/5cjz7jyqyfr5vq8b6bjs24vdnvdhy9rb-source/flake.nix:118:7:
          117|
          118|       packages = forEachSystem (system:
             |       ^
          119|         let

       … while checking the derivation 'packages.x86_64-linux.bootstrap-aarch64'
         at /nix/store/dg3hg3ksr5sl3adskxiwj7357z47ggvr-source/lib/attrsets.nix:977:47:
          976|   */
          977|   nameValuePair = name: value: { inherit name value; };
             |                                               ^
          978|

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: 'builtins.storePath' is not allowed in pure evaluation mode

```
@plaflamme
Copy link
Author

@t184256 Any feedback? I'm wondering if this can help get #412 merged which can then unblock #393

@t184256
Copy link
Collaborator

t184256 commented Jul 18, 2025

wonder why it's rebuilding so much...

@Gerschtli
Copy link
Collaborator

Because the flake inputs were updated, seems to be an unrelated change

@plaflamme
Copy link
Author

@t184256 @Gerschtli

Because the flake inputs were updated, seems to be an unrelated change

As mentioned in the PR notes, I had to upgrade the dependencies because the ruff version that we got out of the original ones was something like 0.2.x which is quite old and wasn't finding actually finding some problems in the python source files. We obviously don't have to do this, but then, it will be quite different from the previously existing lints using nix run.

But I believe the cause of rebuild might actually be caused by --impure. This is the error we obtain without this argument:

error:
       … while checking flake output 'packages'
         at /nix/store/5cjz7jyqyfr5vq8b6bjs24vdnvdhy9rb-source/flake.nix:118:7:
          117|
          118|       packages = forEachSystem (system:
             |       ^
          119|         let

       … while checking the derivation 'packages.x86_64-linux.bootstrap-aarch64'
         at /nix/store/dg3hg3ksr5sl3adskxiwj7357z47ggvr-source/lib/attrsets.nix:977:47:
          976|   */
          977|   nameValuePair = name: value: { inherit name value; };
             |                                               ^
          978|

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: 'builtins.storePath' is not allowed in pure evaluation mode

@plaflamme
Copy link
Author

@t184256 @Gerschtli sorry for the additional ping, but any update on this one?

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