summary refs log tree commit diff
path: root/doc/builders/special/mkshell.section.md
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2020-12-13 15:47:22 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2020-12-16 14:51:43 -0300
commit23d578477077834b56e64d084353bfe48d09adf8 (patch)
treea2a930c17a8dbf53d2a8cd7bd244735a2e5f345f /doc/builders/special/mkshell.section.md
parentde8205f8bb2c6ca14730b00ba3a280db1d364b40 (diff)
downloadnixpkgs-23d578477077834b56e64d084353bfe48d09adf8.tar
nixpkgs-23d578477077834b56e64d084353bfe48d09adf8.tar.gz
nixpkgs-23d578477077834b56e64d084353bfe48d09adf8.tar.bz2
nixpkgs-23d578477077834b56e64d084353bfe48d09adf8.tar.lz
nixpkgs-23d578477077834b56e64d084353bfe48d09adf8.tar.xz
nixpkgs-23d578477077834b56e64d084353bfe48d09adf8.tar.zst
nixpkgs-23d578477077834b56e64d084353bfe48d09adf8.zip
Convert mkShell from DocBook to CommonMark
Diffstat (limited to 'doc/builders/special/mkshell.section.md')
-rw-r--r--doc/builders/special/mkshell.section.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/builders/special/mkshell.section.md b/doc/builders/special/mkshell.section.md
new file mode 100644
index 00000000000..1feb75cbd6f
--- /dev/null
+++ b/doc/builders/special/mkshell.section.md
@@ -0,0 +1,15 @@
+# pkgs.mkShell {#sec-pkgs-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 {#sec-pkgs-mkShell-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 ];
+}
+```