From dfb57552793e4b42d69abe6ea4ebe5ce64f1ea5e Mon Sep 17 00:00:00 2001 From: Simon Chatterjee Date: Tue, 17 Sep 2019 12:09:05 +0100 Subject: [PATCH] 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 { };