about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-16 16:04:58 -0400
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-10-18 11:02:23 +0200
commit991adf820bb6d3f4512384ac2ae787b91834d4ba (patch)
tree34fceb8bf0d9385158f88bf98179e0d344b7b9b9 /pkgs
parent918af2267ec06e5e95ec6dfc610de5d1fcf9065f (diff)
downloadnixlib-991adf820bb6d3f4512384ac2ae787b91834d4ba.tar
nixlib-991adf820bb6d3f4512384ac2ae787b91834d4ba.tar.gz
nixlib-991adf820bb6d3f4512384ac2ae787b91834d4ba.tar.bz2
nixlib-991adf820bb6d3f4512384ac2ae787b91834d4ba.tar.lz
nixlib-991adf820bb6d3f4512384ac2ae787b91834d4ba.tar.xz
nixlib-991adf820bb6d3f4512384ac2ae787b91834d4ba.tar.zst
nixlib-991adf820bb6d3f4512384ac2ae787b91834d4ba.zip
pythonPackages.foolscap: refactor move to python-modules
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/foolscap/default.nix40
-rw-r--r--pkgs/top-level/python-packages.nix36
2 files changed, 41 insertions, 35 deletions
diff --git a/pkgs/development/python-modules/foolscap/default.nix b/pkgs/development/python-modules/foolscap/default.nix
new file mode 100644
index 000000000000..94b90a25d137
--- /dev/null
+++ b/pkgs/development/python-modules/foolscap/default.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, mock
+, twisted
+, pyopenssl
+, service-identity
+}:
+
+buildPythonPackage rec {
+  pname = "foolscap";
+  version = "0.12.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1bpmqq6485mmr5jza9q2c55l9m1bfsvsbd9drsip7p5qcsi22jrz";
+  };
+
+  propagatedBuildInputs = [ mock twisted pyopenssl service-identity ];
+
+  checkPhase = ''
+    # Either uncomment this, or remove this custom check phase entirely, if
+    # you wish to do battle with the foolscap tests. ~ C.
+    # trial foolscap
+  '';
+
+  meta = with stdenv.lib; {
+    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 = licenses.mit;
+  };
+
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2a13c1421cf0..0aa1f56037bf 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2301,41 +2301,7 @@ in {
 
   fonttools = callPackage ../development/python-modules/fonttools { };
 
-  foolscap = buildPythonPackage (rec {
-    name = "foolscap-${version}";
-    version = "0.12.6";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/f/foolscap/${name}.tar.gz";
-      sha256 = "1bpmqq6485mmr5jza9q2c55l9m1bfsvsbd9drsip7p5qcsi22jrz";
-    };
-
-    propagatedBuildInputs = with self; [ mock twisted pyopenssl service-identity ];
-
-    checkPhase = ''
-      # Either uncomment this, or remove this custom check phase entirely, if
-      # you wish to do battle with the foolscap tests. ~ C.
-      # trial foolscap
-    '';
-
-    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 = licenses.mit;
-
-      maintainers = [ ];
-    };
-  });
+  foolscap = callPackage ../development/python-modules/foolscap { };
 
   forbiddenfruit = buildPythonPackage rec {
     version = "0.1.0";