diff --git a/pkgs/development/python-modules/plum-py/default.nix b/pkgs/development/python-modules/plum-py/default.nix new file mode 100644 index 00000000000..50a33266c8f --- /dev/null +++ b/pkgs/development/python-modules/plum-py/default.nix @@ -0,0 +1,29 @@ +{ lib, buildPythonPackage, fetchFromGitLab, isPy3k, pytest, baseline }: + +buildPythonPackage rec { + pname = "plum-py"; + version = "0.4.0"; + disabled = !isPy3k; + + src = fetchFromGitLab { + owner = "dangass"; + repo = "plum"; + rev = "6a9ff863c0e9fa21f7b2230d25402155a5522e4b"; + sha256 = "1iv62yb704c61b0dvsmyp3j6xpbmay532g9ny4pw4zbg3l69vd5j"; + }; + + postPatch = '' + substituteInPlace src/plum/int/flag/_flag.py \ + --replace 'if sys.version_info < (3, 7):' 'if True:' + ''; + + checkInputs = [ pytest baseline ]; + checkPhase = "pytest tests"; + + meta = with lib; { + description = "Classes and utilities for packing/unpacking bytes"; + homepage = "https://plum-py.readthedocs.io/en/latest/index.html"; + license = licenses.mit; + maintainers = with maintainers; [ dnr ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6cc22e7aeca..077ff2ffbe2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5152,6 +5152,8 @@ in { plugwise = callPackage ../development/python-modules/plugwise { }; + plum-py = callPackage ../development/python-modules/plum-py { }; + plumbum = callPackage ../development/python-modules/plumbum { }; ply = callPackage ../development/python-modules/ply { };