From ab5a5c15cb712ed41e63de3b36a32c531ae1ec00 Mon Sep 17 00:00:00 2001 From: Simon Chatterjee Date: Tue, 17 Sep 2019 11:54:22 +0100 Subject: [PATCH 1/4] maintainers: add simonchatts --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index b777d37d764a..9f3586293ad8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5898,6 +5898,12 @@ fingerprint = "ADF4 C13D 0E36 1240 BD01 9B51 D1DE 6D7F 6936 63A5"; }]; }; + simonchatts = { + email = "code@chatts.net"; + github = "simonchatts"; + githubId = 11135311; + name = "Simon Chatterjee"; + }; simonvandel = { email = "simon.vandel@gmail.com"; github = "simonvandel"; From 8d00c48937d87a51d191796b89d0daae63830742 Mon Sep 17 00:00:00 2001 From: Simon Chatterjee Date: Tue, 17 Sep 2019 12:02:18 +0100 Subject: [PATCH 2/4] pythonPackages.janus: init at 0.4.0 --- .../python-modules/janus/default.nix | 20 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/python-modules/janus/default.nix diff --git a/pkgs/development/python-modules/janus/default.nix b/pkgs/development/python-modules/janus/default.nix new file mode 100644 index 000000000000..ea82ec4f99bc --- /dev/null +++ b/pkgs/development/python-modules/janus/default.nix @@ -0,0 +1,20 @@ +{ lib, buildPythonPackage, fetchPypi, pytest }: + +buildPythonPackage rec { + pname = "janus"; + version = "0.4.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "cfc221683160b91b35bae1917e2957b78dad10a2e634f4f8ed119ed72e2a88ef"; + }; + + checkInputs = [ pytest ]; + + meta = with lib; { + description = "Mixed sync-async queue"; + homepage = "https://github.com/aio-libs/janus"; + license = licenses.asl20; + maintainers = [ maintainers.simonchatts ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a610ef51d8c6..28b58d81847c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -689,6 +689,8 @@ in { inquirer = callPackage ../development/python-modules/inquirer { }; + janus = callPackage ../development/python-modules/janus { }; + jira = callPackage ../development/python-modules/jira { }; jwcrypto = callPackage ../development/python-modules/jwcrypto { }; From dfb57552793e4b42d69abe6ea4ebe5ce64f1ea5e Mon Sep 17 00:00:00 2001 From: Simon Chatterjee Date: Tue, 17 Sep 2019 12:09:05 +0100 Subject: [PATCH 3/4] pythonPackages.entrance: init at 1.1.10 --- .../python-modules/entrance/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/entrance/default.nix diff --git a/pkgs/development/python-modules/entrance/default.nix b/pkgs/development/python-modules/entrance/default.nix new file mode 100644 index 000000000000..67005d577cd1 --- /dev/null +++ b/pkgs/development/python-modules/entrance/default.nix @@ -0,0 +1,45 @@ +{ lib, fetchPypi, buildPythonPackage, pythonOlder, routerFeatures +, janus, ncclient, paramiko, pyyaml, sanic }: + +let + # The `routerFeatures` flag optionally brings in some somewhat heavy + # dependencies, in order to enable interacting with routers + opts = if routerFeatures then { + prePatch = '' + substituteInPlace ./setup.py --replace "extra_deps = []" "extra_deps = router_feature_deps" + ''; + extraBuildInputs = [ janus ncclient paramiko ]; + } else { + prePatch = ""; + extraBuildInputs = []; + }; + +in + +buildPythonPackage rec { + pname = "entrance"; + version = "1.1.10"; + + src = fetchPypi { + inherit pname version; + sha256 = "080qkvkmfw4004cl721l5bvpg001xz8vs6q59dg797kqxfrwk5kw"; + }; + + # The versions of `sanic` and `websockets` in nixpkgs only support 3.6 or later + disabled = pythonOlder "3.6"; + + # No useful tests + doCheck = false; + + propagatedBuildInputs = [ pyyaml sanic ] ++ opts.extraBuildInputs; + + prePatch = opts.prePatch; + + meta = with lib; { + description = "A server framework for web apps with an Elm frontend"; + homepage = https://github.com/ensoft/entrance; + license = licenses.mit; + maintainers = with maintainers; [ simonchatts ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 28b58d81847c..4a19c606036c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -563,6 +563,10 @@ in { diff-match-patch = callPackage ../development/python-modules/diff-match-patch { }; + entrance = callPackage ../development/python-modules/entrance { routerFeatures = false; }; + + entrance-with-router-features = callPackage ../development/python-modules/entrance { routerFeatures = true; }; + eradicate = callPackage ../development/python-modules/eradicate { }; face = callPackage ../development/python-modules/face { }; From 212973a057d4c0c4c78bc7470ae4d608e5617bc6 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Tue, 1 Oct 2019 07:47:54 +0000 Subject: [PATCH 4/4] pythonPackages.janus: disabled if python < 3.6 --- pkgs/development/python-modules/janus/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/janus/default.nix b/pkgs/development/python-modules/janus/default.nix index ea82ec4f99bc..da0f43811f23 100644 --- a/pkgs/development/python-modules/janus/default.nix +++ b/pkgs/development/python-modules/janus/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pytest }: +{ lib, buildPythonPackage, fetchPypi, pytest, pythonOlder }: buildPythonPackage rec { pname = "janus"; @@ -9,7 +9,9 @@ buildPythonPackage rec { sha256 = "cfc221683160b91b35bae1917e2957b78dad10a2e634f4f8ed119ed72e2a88ef"; }; - checkInputs = [ pytest ]; + disabled = pythonOlder "3.6"; + + checkInputs = [ pytest ]; meta = with lib; { description = "Mixed sync-async queue";