summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-04-17 09:06:42 +0000
committerLudovic Courtès <ludo@gnu.org>2009-04-17 09:06:42 +0000
commit5bed8bd9e1eab9638a1650409a92d6ccb71e27f1 (patch)
tree553529ccc2814d12e5eb1c23de561ad9ef3d75cb /pkgs
parent0d067c287bf381ac95d5b4784ffcd02f52076b7d (diff)
downloadnixlib-5bed8bd9e1eab9638a1650409a92d6ccb71e27f1.tar
nixlib-5bed8bd9e1eab9638a1650409a92d6ccb71e27f1.tar.gz
nixlib-5bed8bd9e1eab9638a1650409a92d6ccb71e27f1.tar.bz2
nixlib-5bed8bd9e1eab9638a1650409a92d6ccb71e27f1.tar.lz
nixlib-5bed8bd9e1eab9638a1650409a92d6ccb71e27f1.tar.xz
nixlib-5bed8bd9e1eab9638a1650409a92d6ccb71e27f1.tar.zst
nixlib-5bed8bd9e1eab9638a1650409a92d6ccb71e27f1.zip
Add simplejson, a JSON encoded/decoded for Python.
svn path=/nixpkgs/trunk/; revision=15110
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/simplejson/default.nix45
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/simplejson/default.nix b/pkgs/development/python-modules/simplejson/default.nix
new file mode 100644
index 000000000000..9f53d9364f18
--- /dev/null
+++ b/pkgs/development/python-modules/simplejson/default.nix
@@ -0,0 +1,45 @@
+{ fetchsvn, stdenv, python, setuptools }:
+
+stdenv.mkDerivation rec {
+  name = "simplejson-2.0.9";
+
+  src = fetchsvn {
+    url = "http://simplejson.googlecode.com/svn/tags/${name}";
+    sha256 = "a48d5256fdb4f258c33da3dda110ecf3c786f086dcb08a01309acde6d1ddb921";
+    rev = "172";  # to be on the safe side
+  };
+
+  buildInputs = [ python ];
+  propagatedBuildInputs = [ setuptools ];
+
+  doCheck = true;
+
+  buildPhase     = "python setup.py build --build-base $out";
+  checkPhase     = "python setup.py test";
+
+  installPhase   = ''
+    ensureDir "$out/lib/python2.5/site-packages"
+
+    PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \
+    python setup.py install --prefix="$out"
+
+    # Remove irrelevant directories.
+    rm -rvf "$out/"lib.* "$out/"temp.*
+  '';
+
+  meta = {
+    description = "simplejson is a simple, fast, extensible JSON encoder/decoder for Python";
+
+    longDescription = ''
+      simplejson is compatible with Python 2.4 and later with no
+      external dependencies.  It covers the full JSON specification
+      for both encoding and decoding, with unicode support.  By
+      default, encoding is done in an encoding neutral fashion (plain
+      ASCII with \uXXXX escapes for unicode characters).
+    '';
+
+    homepage = http://code.google.com/p/simplejson/;
+
+    license = "MIT";
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e91041ac4d8b..4cb1ab222fa8 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6482,6 +6482,10 @@ let
     inherit python;
   };
 
+  simplejson = import ../development/python-modules/simplejson {
+    inherit fetchsvn stdenv python setuptools;
+  };
+
   wxPython = wxPython26;
 
   wxPython26 = import ../development/python-modules/wxPython/2.6.nix {