Skip to content

Instantly share code, notes, and snippets.

@idontgetoutmuch
Created September 25, 2019 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idontgetoutmuch/64044fd6c8d8841b958153a0f301d48b to your computer and use it in GitHub Desktop.
Save idontgetoutmuch/64044fd6c8d8841b958153a0f301d48b to your computer and use it in GitHub Desktop.
# 5. example of multiple contents, emacs and vi happily coexisting
editors = buildImage {
name = "editors";
contents = [
pkgs.coreutils
pkgs.bash
pkgs.emacs
pkgs.vim
pkgs.nano
];
};
# 5a. example of R
rR = buildImage {
name = "rR";
contents = [
pkgs.coreutils
pkgs.bash
# pkgs.R
# pkgs.rPackages.dplyr
];
};
# 6. nix example to play with the container nix store
# docker run -it --rm nix nix-store -qR $(nix-build '<nixpkgs>' -A nix)
nix = buildImageWithNixDb {
name = "nix";
tag = "latest";
contents = [
# nix-store uses cat program to display results as specified by
# the image env variable NIX_PAGER.
pkgs.coreutils
pkgs.nix
];
config = {
Env = [ "NIX_PAGER=cat" ];
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment