Skip to content

Instantly share code, notes, and snippets.

@heathdrobertson
Created November 14, 2019 01:17
Show Gist options
  • Save heathdrobertson/b75c075475f4871eece8a372ad36f3af to your computer and use it in GitHub Desktop.
Save heathdrobertson/b75c075475f4871eece8a372ad36f3af to your computer and use it in GitHub Desktop.
A sample container expossing a running Nix shell.
# This imports the nix package collection,
# so we can access the `pkgs` and `stdenv` variables
with import <nixpkgs> {};
# Make a new "derivation" that represents our shell
stdenv.mkDerivation {
name = "haskell_env";
# The packages in the `buildInputs` list will be added to the PATH in our shell
buildInputs = [
# cowsay is an arbitary package
# see https://nixos.org/nixos/packages.html to search for more
pkgs.cowsay
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment