nixpkgs/pkgs/development/python-modules/entrance/default.nix
Simon Chatterjee 3eea039a96 python: entrance: 1.1.12 -> 1.1.13
Required by the ujson update in #89723
2020-06-20 12:30:50 +02:00

46 lines
1.2 KiB
Nix

{ 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.13";
src = fetchPypi {
inherit pname version;
sha256 = "1vmyfhlpcz9fip89z7bl9va3bybz4p3clifn6x3329v1ms9bm1gc";
};
# 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 ];
};
}