git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #63503 from dmvianna/pycategories-1.1.0

pythonPackages.pycategories: init at 1.2.0

commit2aaf19152b4587e50111b5ca59df8d89485dc903 authorworldofpeace <worldofpeace@protonmail.ch> dateTue 25 Jun 2019, 09:53 (7 years ago) parent6ecce71e37eddc
3 files changed+60
pkgs/development/python-modules/pycategories/default.nix+35 pkgs/development/python-modules/pycategories/infix.nix+23 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/pycategories/default.nixnew file+35
@@ -0,0 +1,35 @@
1+{ buildPythonPackage
2+, callPackage
3+, pytestcov
4+, fetchPypi
5+, lib
6+, pytest
7+, pythonOlder
8+, pytestrunner
9+}:
10+
11+buildPythonPackage rec {
12+ pname = "pycategories";
13+ version = "1.2.0";
14+ disabled = pythonOlder "3.4";
15+
16+ src = fetchPypi {
17+ inherit pname version;
18+ sha256 = "bd70ecb5e94e7659e564ea153f0c7673291dc37c526c246800fc08d6c5378099";
19+ };
20+
21+ nativeBuildInputs = [ pytestrunner ];
22+
23+ # Is private because the author states it's unmaintained
24+ # and shouldn't be used in production code
25+ propagatedBuildInputs = [ (callPackage ./infix.nix { }) ];
26+
27+ checkInputs = [ pytest pytestcov ];
28+
29+ meta = with lib; {
30+ homepage = "https://gitlab.com/danielhones/pycategories";
31+ description = "Implementation of some concepts from category theory";
32+ license = licenses.mit;
33+ maintainers = with maintainers; [ dmvianna ];
34+ };
35+}
pkgs/development/python-modules/pycategories/infix.nixnew file+23
@@ -0,0 +1,23 @@
1+{ buildPythonPackage
2+, lib
3+, fetchPypi
4+}:
5+
6+buildPythonPackage rec {
7+ pname = "infix";
8+ version = "1.2";
9+
10+ src = fetchPypi {
11+ inherit pname version;
12+ sha256 = "a1bfdcf875bc072f41e426d0673f2e3017750743bb90cc725fffb292eb09648c";
13+ };
14+
15+ # No tests
16+ doCheck = false;
17+
18+ meta = {
19+ homepage = "https://github.com/borntyping/python-infix";
20+ description = "A decorator that allows functions to be used as infix functions";
21+ license = lib.licenses.mit;
22+ };
23+}
pkgs/top-level/python-packages.nix+2
@@ -682,6 +682,8 @@ in {
682682 inherit (pkgs) pkgconfig;
683683 };
684684
685+ pycategories = callPackage ../development/python-modules/pycategories { };
686+
685687 pycangjie = disabledIf (!isPy3k) (callPackage ../development/python-modules/pycangjie {
686688 inherit (pkgs) pkgconfig;
687689 });