nixpkgs docs: move shell section to its own file

This commit is contained in:
Graham Christensen 2018-10-02 14:13:42 -04:00
parent 8bf342ffb8
commit 507a63c885
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
2 changed files with 1 additions and 1 deletions

View file

@ -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 <nixpkgs> {} }:
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 ];
}
```