Created
February 1, 2025 11:04
-
-
Save dacr/b0fa49eda3648cbf80169ae83725adf2 to your computer and use it in GitHub Desktop.
nix shell environment / published by https://github.com/dacr/code-examples-manager #587bd6c9-638a-4900-8b6e-bbb3fdf7104c/d76a123de15265f6ffddcc85c21906135503dbab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## summary : nix shell environment | |
## keywords : nix, shell | |
## publish : gist | |
## authors : David Crosson | |
## license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2) | |
## id : 587bd6c9-638a-4900-8b6e-bbb3fdf7104c | |
## created-on : 2025-02-01T11:42:30+01:00 | |
## managed-by : https://github.com/dacr/code-examples-manager | |
## run-with : nix-shell $file | |
{ pkgs ? import <nixpkgs> {} }: | |
let | |
message = "hello world"; | |
in | |
pkgs.mkShellNoCC { | |
packages = with pkgs; [ cowsay ]; | |
shellHook = '' | |
cowsay ${message} | |
exit | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment