cachix / install-nix-action

Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.
Apache License 2.0
520 stars 80 forks source link

Permission denied in HM CI for version 24 #203

Closed rycee closed 9 months ago

rycee commented 9 months ago

For some reason, one of the tests in HM fails in the CI for the update to version 24. See https://github.com/nix-community/home-manager/pull/4734 for the PR. The CI error ends with

          at /nix/store/0ay926zzkka2wbh48rj4caj9l9sa42ci-source/lib/modules.nix:825:137:

          824|         defs' = concatMap (m:
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          826|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/0ay926zzkka2wbh48rj4caj9l9sa42ci-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       error: getting attributes of path '/nix/store/6s2f96qrzqq9gdr5pygwnx55zbz0sp0m-hm_sourcewithspaces': Permission denied

and I can't recall ever seeing such an error before. If you have a checkout of HM you can run the above test with nix develop .#files-source-with-spaces and it works well for me, but I only have Nix 2.13.6.

I have not yet had time to dig into this so I cannot say whether the issue is related to Nix 2.19.1 or the way Nix is installed by this action. The issue is definitely introduced by version 24 of the install action, though, since the same CI job works well with version 23.

Perhaps somebody has run into a similar issue before?

sandydoo commented 9 months ago

Looks like an issue with Nix 2.19.x. Rolling back the CI to either 2.17 or 2.18 resolves the error.

I tried running nix develop .#files-source-with-spaces against Nix 2.19 locally and couldn't replicate the issue.

sandydoo commented 9 months ago

https://github.com/NixOS/nix/issues/9579

rycee commented 9 months ago

Thanks @sandydoo, that does indeed seem related. Curious that you couldn't replicate locally. In any case does not seem to be related to the install-nix-action, so I will close this issue.

sandydoo commented 9 months ago

Curious that you couldn't replicate locally

Yeah, that was unexpected. I didn't really dig too much into it.