2019-09-17 11:09:05 +00:00
|
|
|
{ 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";
|
2021-06-18 21:47:15 +00:00
|
|
|
version = "1.1.17";
|
2019-09-17 11:09:05 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-18 21:47:15 +00:00
|
|
|
sha256 = "dee5b4f3330f633fcd4e665f1781bf6e53b375ffdc7a24434257dfba6b1c2d7f";
|
2019-09-17 11:09:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# 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";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ensoft/entrance";
|
2019-09-17 11:09:05 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ simonchatts ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|