From 0d067c287bf381ac95d5b4784ffcd02f52076b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 16 Apr 2009 22:59:14 +0000 Subject: [PATCH] Add Foolscap, a distributed capability RPC protocol. svn path=/nixpkgs/trunk/; revision=15109 --- .../python-modules/foolscap/default.nix | 53 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/foolscap/default.nix diff --git a/pkgs/development/python-modules/foolscap/default.nix b/pkgs/development/python-modules/foolscap/default.nix new file mode 100644 index 000000000000..c52a9be538a0 --- /dev/null +++ b/pkgs/development/python-modules/foolscap/default.nix @@ -0,0 +1,53 @@ +{ fetchurl, stdenv, python, setuptools, twisted, pyopenssl }: + +stdenv.mkDerivation rec { + name = "foolscap-0.3.2"; + + src = fetchurl { + url = "http://foolscap.lothar.com/releases/${name}.tar.gz"; + sha256 = "1wkqgm6anlxvz8dnqx7ki008255nm1mlhak5n9xy6g1yf31fn3l0"; + }; + + buildInputs = [ python ]; + propagatedBuildInputs = [ setuptools twisted pyopenssl ]; + + doCheck = true; + + buildPhase = "python setup.py build --build-base $out"; + checkPhase = "python setup.py test"; + + # FIXME: `$out/bin/flogtool' can't find its friends: + # + # $ ./result/bin/flogtool --help + # Traceback (most recent call last): + # File "./result/bin/flogtool", line 4, in + # import pkg_resources + # ImportError: No module named pkg_resources + + installPhase = '' + ensureDir "$out/lib/python2.5/site-packages" + + PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \ + python setup.py install --prefix="$out" + + ensureDir "$out/doc/${name}" + cp -rv "doc/"* "$out/doc/${name}" + ''; + + + meta = { + homepage = http://foolscap.lothar.com/; + + description = "Foolscap, an RPC protocol for Python that follows the distributed object-capability model"; + + longDescription = '' + "Foolscap" is the name for the next-generation RPC protocol, + intended to replace Perspective Broker (part of Twisted). + Foolscap is a protocol to implement a distributed + object-capabilities model in Python. + ''; + + # See http://foolscap.lothar.com/trac/browser/LICENSE. + license = "MIT"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b6279fcd059..e91041ac4d8b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6382,6 +6382,10 @@ let setuptools = setuptools.passthru.function {inherit python;}; }); + foolscap = import ../development/python-modules/foolscap { + inherit fetchurl stdenv python setuptools twisted pyopenssl; + }; + nevow = import ../development/python-modules/nevow { inherit fetchurl stdenv python setuptools twisted makeWrapper lib; };