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

fix(nix): add support for Nix forks #2091

Merged
merged 3 commits into from
May 30, 2024
Merged

fix(nix): add support for Nix forks #2091

merged 3 commits into from
May 30, 2024

Conversation

SapphicCode
Copy link
Contributor

@SapphicCode SapphicCode commented May 28, 2024

Summary

Increases leniency for nix --version output to support Nix forks, such as Lix:

nix (Lix, like Nix) 2.90.0-beta.1-lixpre20240506-b6799ab

How was it tested?

On Lix:

$ nix --version
nix (Lix, like Nix) 2.90.0-beta.1-lixpre20240506-b6799ab

$ go run ./cmd/devbox run nix --version
nix (Lix, like Nix) 2.90.0-beta.1-lixpre20240506-b6799ab

$ go run ./cmd/devbox shell
# (works as expected)

On Nix:

$ nix shell nixpkgs#nix

$ nix --version
nix (Nix) 2.18.2

$ go run ./cmd/devbox run nix --version
nix (Nix) 2.18.2

$ go run ./cmd/devbox shell
# (works as expected)

What did it look like before?

$ go run ./cmd/devbox shell
Error: nix: ensure install: get version: parse nix version: nix (Lix, like Nix) 2.90.0-beta.1-lixpre20240506-b6799ab

exit status 1

Increases leniency for `nix --version` output to support Nix forks, such
as Lix:

`nix (Lix, like Nix) 2.90.0-beta.1-lixpre20240506-b6799ab`
@gcurtis gcurtis self-requested a review May 30, 2024 19:06
@gcurtis
Copy link
Collaborator

gcurtis commented May 30, 2024

@SapphicCode thanks for the PR! I made the regex a little more lenient and added some tests. I'll merge this after tests pass.

@gcurtis gcurtis merged commit 4bd4b42 into jetify-com:main May 30, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants