From 5862c6835a3280089a8258a9067fde69f827396c Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 8 May 2018 22:14:03 +0000 Subject: [PATCH 1/2] pythonPackages.immutables: init at 0.5 --- .../python-modules/immutables/default.nix | 19 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 pkgs/development/python-modules/immutables/default.nix diff --git a/pkgs/development/python-modules/immutables/default.nix b/pkgs/development/python-modules/immutables/default.nix new file mode 100644 index 000000000000..975353406ca9 --- /dev/null +++ b/pkgs/development/python-modules/immutables/default.nix @@ -0,0 +1,19 @@ +{ lib, buildPythonPackage, fetchPypi, pythonOlder }: + +buildPythonPackage rec { + pname = "immutables"; + version = "0.5"; + disabled = pythonOlder "3.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hba0vkqanwfnb5b3rs14bs7schsmczhan5nd93c1i6fzi17glap"; + }; + + meta = { + description = "An immutable mapping type for Python"; + homepage = https://github.com/MagicStack/immutables; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ catern ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7868f7d7ff06..f1be56353425 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3120,6 +3120,8 @@ in { imbalanced-learn = callPackage ../development/python-modules/imbalanced-learn { }; + immutables = callPackage ../development/python-modules/immutables {}; + imread = buildPythonPackage rec { name = "python-imread-${version}"; version = "0.6"; From 1bfa8c294c6034c60a54cdd93e86229a44499509 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 8 May 2018 22:14:21 +0000 Subject: [PATCH 2/2] pythonPackages.contextvars: init at 2.2 --- .../python-modules/contextvars/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/python-modules/contextvars/default.nix diff --git a/pkgs/development/python-modules/contextvars/default.nix b/pkgs/development/python-modules/contextvars/default.nix new file mode 100644 index 000000000000..d8ee3b1ca9ef --- /dev/null +++ b/pkgs/development/python-modules/contextvars/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi, isPy36, immutables }: + +buildPythonPackage rec { + pname = "contextvars"; + version = "2.2"; + disabled = !isPy36; + + src = fetchPypi { + inherit pname version; + sha256 = "046b385nfzkjh0wqmd268p2jkgn9fg6hz40npq7j1w3c8aqzhwvx"; + }; + + propagatedBuildInputs = [ immutables ]; + + meta = { + description = "A backport of the Python 3.7 contextvars module for Python 3.6"; + homepage = https://github.com/MagicStack/contextvars; + license = with lib.licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ catern ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f1be56353425..cfeeb96e8834 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1629,6 +1629,8 @@ in { contexter = callPackage ../development/python-modules/contexter { }; + contextvars = callPackage ../development/python-modules/contextvars {}; + contextlib2 = callPackage ../development/python-modules/contextlib2 { }; cookiecutter = callPackage ../development/python-modules/cookiecutter { };