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

support both classical nix and flakes #916

Merged
merged 1 commit into from
Feb 15, 2025
Merged

Conversation

Janik-Haag
Copy link
Contributor

{ pkgs }: means the shell.nix file expects to be called with an already initialized version of nixpkgs, which is not the case when using the nix-shell command. The flake.nix / nix develop avoids this by passing an already initialized version.
This change makes the shell.nix check if its caller is calling it with a pkgs attribute and if that's not the case it just imports pkgs from the nixpkgs channel.

Copy link
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

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

Thanks.

Side note: I feel silly now that before that we made ctags an overlay that we export in the flake. I don't expect anyone to consume it, we should just have that bit of code living in shell.nix.

@keegancsmith keegancsmith merged commit 388cba6 into sourcegraph:main Feb 15, 2025
1 check passed
@Janik-Haag Janik-Haag deleted the nix branch February 15, 2025 22:05
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.

2 participants