4 changed files with 79 additions and 0 deletions
@ -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 ]; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,22 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pytest, pythonOlder }: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "janus"; |
||||
version = "0.4.0"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "cfc221683160b91b35bae1917e2957b78dad10a2e634f4f8ed119ed72e2a88ef"; |
||||
}; |
||||
|
||||
disabled = pythonOlder "3.6"; |
||||
|
||||
checkInputs = [ pytest ]; |
||||
|
||||
meta = with lib; { |
||||
description = "Mixed sync-async queue"; |
||||
homepage = "https://github.com/aio-libs/janus"; |
||||
license = licenses.asl20; |
||||
maintainers = [ maintainers.simonchatts ]; |
||||
}; |
||||
} |
Loading…
Reference in new issue