2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
routerFeatures,
|
|
|
|
janus,
|
|
|
|
ncclient,
|
|
|
|
paramiko,
|
|
|
|
pyyaml,
|
|
|
|
sanic,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
# The `routerFeatures` flag optionally brings in some somewhat heavy
|
|
|
|
# dependencies, in order to enable interacting with routers
|
2024-06-05 15:53:02 +00:00
|
|
|
opts =
|
|
|
|
if routerFeatures then
|
|
|
|
{
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace ./setup.py --replace "extra_deps = []" "extra_deps = router_feature_deps"
|
|
|
|
'';
|
|
|
|
extraBuildInputs = [
|
|
|
|
janus
|
|
|
|
ncclient
|
|
|
|
paramiko
|
|
|
|
];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
prePatch = "";
|
|
|
|
extraBuildInputs = [ ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "entrance";
|
2023-02-22 10:55:15 +00:00
|
|
|
version = "1.1.20";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-PvsP6HXCllW102h3o7abz9uC2AZTwvg5qIqP+rdkk6Y=";
|
2020-04-24 23:36:52 +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;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
sanic
|
|
|
|
] ++ opts.extraBuildInputs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
prePatch = opts.prePatch;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Server framework for web apps with an Elm frontend";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ensoft/entrance";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ simonchatts ];
|
|
|
|
};
|
|
|
|
}
|