We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 74e1e9e commit c818826Copy full SHA for c818826
README.md
@@ -1,7 +1,10 @@
1
-# nix-shell workshop
+# nix-shell workshop
2
3
## normal c programs
4
## go programs
5
## qt programs
6
## perl
7
## python
8
+enter environment by typing `nix-shell` in ./python-program
9
+run simpleCurl by running `python simpleCurl http://test.de`
10
+it will output the html of http://test.de
python-program/default.nix
@@ -0,0 +1,12 @@
+let
+ pkgs = import <nixpkgs> {};
+ stdenv = pkgs.stdenv;
+
+in stdenv.mkDerivation {
+ name = "simpleCurl-env";
+ buildInputs = with pkgs; [
+ python2
+ python2Packages.mechanize
11
+ ];
12
+}
python-program/simpleCurl.py
@@ -0,0 +1,6 @@
+import mechanize
+import sys
+br = mechanize.Browser()
+r = br.open(sys.argv[1])
+print r.read()
0 commit comments