diff --git a/pkgs/development/python-modules/simplejson/default.nix b/pkgs/development/python-modules/simplejson/default.nix new file mode 100644 index 00000000000..9f53d9364f1 --- /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 e91041ac4d8..4cb1ab222fa 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 {