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

Testing with Nix 2.2. #99

Closed
Zimmi48 opened this issue Oct 1, 2021 · 6 comments
Closed

Testing with Nix 2.2. #99

Zimmi48 opened this issue Oct 1, 2021 · 6 comments

Comments

@Zimmi48
Copy link

Zimmi48 commented Oct 1, 2021

Hi!

The documentation seems to indicate that it should be possible to run this action with an older Nix version by using the install_url input. I've tried testing with Nix 2.2 by setting install_url: https://releases.nixos.org/nix/nix-2.2/install but I've obtained the following error:

/dev/fd/63: SHA-256 hash mismatch in 'https://nixos.org/releases/nix/nix-2.2/nix-2.2-x86_64-darwin.tar.bz2';
expected sha256-1zRgN1HUvaA+FJjOLSVlLv5+f9bdHBbBVKTBYTpSj68=,
got d734603751d4bda03e1498ce2d25652efe7e7fd6dd1c16c154a4c1613a528faf

Is testing with Nix 2.2 supported and if yes how? Otherwise, do you have any suggestion on how to test build a derivation with Nix 2.2? (I am trying to understand why a PR fails in nixpkgs's CI while the same derivation builds fine in GitHub Actions and I suspect that it might be due to the version of Nix since I don't see any other explanation for the inconsistency.)

@domenkozar
Copy link
Member

That looks like a problem with the installer itself expecting a different hash of the tarball for installation.

I'd suggest to open an issue since it's important to fix this

@Zimmi48
Copy link
Author

Zimmi48 commented Oct 1, 2021

OK. You mean opening an issue in the Nix repository itself, right?

@domenkozar
Copy link
Member

@Zimmi48
Copy link
Author

Zimmi48 commented Oct 1, 2021

Done. Note that I didn't have more luck when trying to install Nix 2.3 (or Nix 2.3.4) as it failed with a different error (later in the process):


Error: Command failed: /Users/runner/work/_actions/cachix/install-nix-action/v12/lib/install-nix.sh
    at checkExecSyncError (child_process.js:621:11)
    at Object.execFileSync (child_process.js:639:15)
    at Object.<anonymous> (/Users/runner/work/_actions/cachix/install-nix-action/v12/lib/main.js:4:17)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)

    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 1156,
  stdout: null,
  stderr: null
}

And when trying to reproduce the problem using Travis, I got a different error (https://travis-ci.community/t/cannot-run-travis-with-nix-2-2-or-2-3/12203).

With both GitHub Actions and Travis, it starts working fine with Nix 2.3.5, but I have no idea if the reasons it fails are related.

@domenkozar
Copy link
Member

You'd have to use an older version of the action, as the latest one uses features from Nix 2.3.11 (iirc) to speed up the installation.

@Zimmi48
Copy link
Author

Zimmi48 commented Oct 2, 2021

OK thanks for the clarification. I think it'd be worth adding this piece of info (minimal supported Nix version) in the documentation then.

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

No branches or pull requests

2 participants