Skip to content

Add funny joke to shell hook example #214

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions nix/shell/example.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{ pkgs }:

let
joke = { FUNNY_JOKE = "What kind of phone does a turtle use? A shell phone!"; };
in
{
example = pkgs.mkShell {
example = pkgs.mkShell (joke // {
packages = with pkgs; [ curl jq git ];
});

FUNNY_JOKE = "What kind of phone does a turtle use? A shell phone!";
};

hook = pkgs.mkShell {
hook = pkgs.mkShell (joke // {
shellHook = ''
echo "Congrats! You just triggered a shell hook for a Nix development environment."
echo "Run \"exit\" to exit this environment."
echo "Then run \"nix develop github:DeterminateSystems/zero-to-nix#hook\" again to re-trigger this hook."
'';
};
});

cpp = pkgs.mkShell {
packages = with pkgs; [ gcc cmake ];
Expand Down