From 507a63c88557f8afa06a3e507fe3d055fc55a815 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 2 Oct 2018 14:13:42 -0400 Subject: nixpkgs docs: move shell section to its own file --- doc/functions/shell.section.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/functions/shell.section.md (limited to 'doc/functions') diff --git a/doc/functions/shell.section.md b/doc/functions/shell.section.md new file mode 100644 index 000000000000..cb8832a814fc --- /dev/null +++ b/doc/functions/shell.section.md @@ -0,0 +1,22 @@ +--- +title: pkgs.mkShell +author: zimbatm +date: 2017-10-30 +--- + +# mkShell + +pkgs.mkShell is a special kind of derivation that is only useful when using +it combined with nix-shell. It will in fact fail to instantiate when invoked +with nix-build. + +## Usage + +```nix +{ pkgs ? import {} }: +pkgs.mkShell { + # this will make all the build inputs from hello and gnutar available to the shell environment + inputsFrom = with pkgs; [ hello gnutar ]; + buildInputs = [ pkgs.gnumake ]; +} +``` -- cgit 1.4.1