From 9295ffbf8edc76c777146b6d1b65d75118f2103b Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Thu, 13 Dec 2018 03:01:45 +0000 Subject: [PATCH] pythonPackages.namedlist: init at 1.7 --- .../python-modules/namedlist/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/namedlist/default.nix diff --git a/pkgs/development/python-modules/namedlist/default.nix b/pkgs/development/python-modules/namedlist/default.nix new file mode 100644 index 000000000000..ae07076bb057 --- /dev/null +++ b/pkgs/development/python-modules/namedlist/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +}: + +buildPythonPackage rec { + pname = "namedlist"; + version = "1.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "11n9c4a5ak9971awkf1g92m6mcmiprhrw98ik2cmjsqxmz73j2qr"; + }; + + # Test file has a `unittest.main()` at the bottom that fails the tests; + # py.test can run the tests without it. + postPatch = '' + substituteInPlace test/test_namedlist.py --replace "unittest.main()" "" + ''; + + checkInputs = [ pytest ]; + checkPhase = '' + py.test + ''; + + meta = { + description = "Similar to namedtuple, but instances are mutable"; + homepage = https://bitbucket.org/ericvsmith/namedlist; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ivan ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a9ecf9495e17..2586ca756f0e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3076,6 +3076,8 @@ in { namebench = callPackage ../development/python-modules/namebench { }; + namedlist = callPackage ../development/python-modules/namedlist { }; + nameparser = callPackage ../development/python-modules/nameparser { }; nbconvert = callPackage ../development/python-modules/nbconvert { };