1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
68 lines
1.3 KiB
Nix
68 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
fetchPypi,
|
|
buildPythonPackage,
|
|
routerFeatures,
|
|
setuptools,
|
|
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-fail "extra_deps = []" "extra_deps = router_feature_deps"
|
|
'';
|
|
extraBuildInputs = [
|
|
janus
|
|
ncclient
|
|
paramiko
|
|
];
|
|
}
|
|
else
|
|
{
|
|
prePatch = "";
|
|
extraBuildInputs = [ ];
|
|
};
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
pname = "entrance";
|
|
version = "1.1.20";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-PvsP6HXCllW102h3o7abz9uC2AZTwvg5qIqP+rdkk6Y=";
|
|
};
|
|
|
|
# The versions of `sanic` and `websockets` in nixpkgs only support 3.6 or later
|
|
|
|
# No useful tests
|
|
doCheck = false;
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
pyyaml
|
|
sanic
|
|
]
|
|
++ opts.extraBuildInputs;
|
|
|
|
prePatch = opts.prePatch;
|
|
|
|
meta = {
|
|
description = "Server framework for web apps with an Elm frontend";
|
|
homepage = "https://github.com/ensoft/entrance";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ simonchatts ];
|
|
};
|
|
}
|