about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorBenno Fünfstück <benno.fuenfstueck@gmail.com>2016-05-29 16:44:54 +0200
committerBenno Fünfstück <benno.fuenfstueck@gmail.com>2016-05-29 16:44:54 +0200
commit5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708 (patch)
treecd38213815377c45d29d3b35b4065ff700294cb3 /doc
parentbad156a0d57c79edcd4d4a135c5586b9f4aaa256 (diff)
downloadnixlib-5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708.tar
nixlib-5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708.tar.gz
nixlib-5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708.tar.bz2
nixlib-5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708.tar.lz
nixlib-5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708.tar.xz
nixlib-5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708.tar.zst
nixlib-5e0acb90d6a3eb43e5b150ce9ed86b68ac83c708.zip
doc/python: fix conversion errors in example code
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/python.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md
index 91c15ccd9e42..50acc7f28f78 100644
--- a/doc/languages-frameworks/python.md
+++ b/doc/languages-frameworks/python.md
@@ -545,7 +545,7 @@ Python environments can be created using the low-level `pkgs.buildEnv` function.
 This example shows how to create an environment that has the Pyramid Web Framework.
 Saving the following as `default.nix`
 
-    with import {};
+    with import <nixpkgs> {};
 
     python.buildEnv.override {
       extraLibs = [ pkgs.pythonPackages.pyramid ];
@@ -562,7 +562,7 @@ You can also use the `env` attribute to create local environments with needed
 packages installed. This is somewhat comparable to `virtualenv`. For example,
 running `nix-shell` with the following `shell.nix`
 
-    with import {};
+    with import <nixpkgs> {};
 
     (python3.buildEnv.override {
       extraLibs = with python3Packages; [ numpy requests ];
@@ -585,7 +585,7 @@ It takes a function as an argument that is passed the set of python packages and
 of the packages to be included in the environment. Using the `withPackages` function, the previous
 example for the Pyramid Web Framework environment can be written like this:
 
-    with import {};
+    with import <nixpkgs> {};
 
     python.withPackages (ps: [ps.pyramid])
 
@@ -593,7 +593,7 @@ example for the Pyramid Web Framework environment can be written like this:
 argument to the function. In the above example, `ps` equals `pythonPackages`.
 But you can also easily switch to using python3:
     
-    with import {};
+    with import <nixpkgs> {};
 
     python3.withPackages (ps: [ps.pyramid])
 
@@ -602,7 +602,7 @@ Now, `ps` is set to `python3Packages`, matching the version of the interpreter.
 As `python.withPackages` simply uses `python.buildEnv` under the hood, it also supports the `env`
 attribute. The `shell.nix` file from the previous section can thus be also written like this:
 
-    with import {};
+    with import <nixpkgs> {};
 
     (python33.withPackages (ps: [ps.numpy ps.requests])).env
 
@@ -619,7 +619,7 @@ Warning: `shellPhase` is executed only if `setup.py` exists.
 
 Given a `default.nix`:
 
-    with import {};
+    with import <nixpkgs> {};
 
     buildPythonPackage { name = "myproject";