-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add nix shell #67
Add nix shell #67
Conversation
@@ -0,0 +1,2 @@ | |||
# Direnv configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is for https://github.com/nix-community/nix-direnv / direnv.net to load the shell once you cd
into the directory. Requires first-time approval.
@@ -0,0 +1,42 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lockfile for the repositories we're using
welcomeMessage = '' | ||
Welcome to the smithy4s Nix shell! 👋 | ||
Available packages: | ||
${builtins.concatStringsSep "\n" (map (n : "- ${n}") shellPackages)} | ||
''; | ||
|
||
shellHook = '' | ||
echo "$welcomeMessage" | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,12 @@ | |||
# For compatibility with non-flake-enabled Nix versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...and certain tools like https://github.com/arrterian/nix-env-selector which don't support flakes yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Initialize nix shell * Show available packages * Show welcome message * Add nix instructions to README
This is just for local usage, I did a POC of using the same shell with the same versions in CI (#68) but it only proved my fears - it takes too long for the initial setup so it doesn't really improve the situation much, regardless of how good Nix is at caching (ephemeral runners don't help).