netbox: 3.1.10 -> 3.2.1
This commit is contained in:
parent
021fad3832
commit
896c716d1b
3 changed files with 41 additions and 15 deletions
|
@ -5,7 +5,7 @@ import ../make-test-python.nix ({ lib, pkgs, ... }: {
|
||||||
maintainers = [ n0emis ];
|
maintainers = [ n0emis ];
|
||||||
};
|
};
|
||||||
|
|
||||||
machine = { ... }: {
|
nodes.machine = { ... }: {
|
||||||
services.netbox = {
|
services.netbox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
secretKeyFile = pkgs.writeText "secret" ''
|
secretKeyFile = pkgs.writeText "secret" ''
|
||||||
|
|
|
@ -10,15 +10,6 @@ let
|
||||||
py = python3.override {
|
py = python3.override {
|
||||||
packageOverrides = self: super: {
|
packageOverrides = self: super: {
|
||||||
django = super.django_3;
|
django = super.django_3;
|
||||||
graphql-core = super.graphql-core.overridePythonAttrs (old: rec {
|
|
||||||
version = "3.1.7";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "graphql-python";
|
|
||||||
repo = old.pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "1mwwh55qd5bcpvgy6pyliwn8jkmj4yk4d2pqb6mdkgqhdic2081l";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
jsonschema = super.jsonschema.overridePythonAttrs (old: rec {
|
jsonschema = super.jsonschema.overridePythonAttrs (old: rec {
|
||||||
version = "3.2.0";
|
version = "3.2.0";
|
||||||
src = self.fetchPypi {
|
src = self.fetchPypi {
|
||||||
|
@ -28,14 +19,26 @@ let
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
lxml = super.lxml.overridePythonAttrs (old: rec {
|
lxml = super.lxml.overridePythonAttrs (old: rec {
|
||||||
pname = "lxml";
|
|
||||||
version = "4.6.5";
|
version = "4.6.5";
|
||||||
|
|
||||||
src = self.fetchPypi {
|
src = self.fetchPypi {
|
||||||
inherit pname version;
|
pname = old.pname;
|
||||||
|
inherit version;
|
||||||
sha256 = "6e84edecc3a82f90d44ddee2ee2a2630d4994b8471816e226d2b771cda7ac4ca";
|
sha256 = "6e84edecc3a82f90d44ddee2ee2a2630d4994b8471816e226d2b771cda7ac4ca";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
werkzeug = super.werkzeug.overridePythonAttrs (old: rec {
|
||||||
|
version = "2.0.3";
|
||||||
|
src = self.fetchPypi {
|
||||||
|
pname = "Werkzeug";
|
||||||
|
inherit version;
|
||||||
|
sha256 = "sha256-uGP4/wV8UiFktgZ8niiwQRYbS+W6TQ2s7qpQoWOCLTw=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
sentry-sdk = super.sentry-sdk.overridePythonAttrs (old: rec {
|
||||||
|
disabledTestPaths = old.disabledTestPaths ++ [
|
||||||
|
"tests/integrations/flask/test_flask.py"
|
||||||
|
];
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,13 +46,13 @@ let
|
||||||
in
|
in
|
||||||
py.pkgs.buildPythonApplication rec {
|
py.pkgs.buildPythonApplication rec {
|
||||||
pname = "netbox";
|
pname = "netbox";
|
||||||
version = "3.1.10";
|
version = "3.2.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "netbox-community";
|
owner = "netbox-community";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-qREq4FJHHTA9Vm6f9kSfiYqur2omFmdsoZ4OdaPFcpU=";
|
sha256 = "sha256-iA0KIgaHQh0OsN/tXmTATIlvnf0aLRdjeQ6VkiR9VJ4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
format = "other";
|
format = "other";
|
||||||
|
@ -57,6 +60,7 @@ py.pkgs.buildPythonApplication rec {
|
||||||
patches = [
|
patches = [
|
||||||
# Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL
|
# Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL
|
||||||
./config.patch
|
./config.patch
|
||||||
|
./graphql-3_2_0.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with py.pkgs; [
|
propagatedBuildInputs = with py.pkgs; [
|
||||||
|
@ -75,6 +79,7 @@ py.pkgs.buildPythonApplication rec {
|
||||||
django-timezone-field
|
django-timezone-field
|
||||||
djangorestframework
|
djangorestframework
|
||||||
drf-yasg
|
drf-yasg
|
||||||
|
swagger-spec-validator # from drf-yasg[validation]
|
||||||
graphene-django
|
graphene-django
|
||||||
jinja2
|
jinja2
|
||||||
markdown
|
markdown
|
||||||
|
|
21
pkgs/servers/web-apps/netbox/graphql-3_2_0.patch
Normal file
21
pkgs/servers/web-apps/netbox/graphql-3_2_0.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
diff --git a/netbox/netbox/graphql/scalars.py b/netbox/netbox/graphql/scalars.py
|
||||||
|
index 7d14189dd..0a18e79d2 100644
|
||||||
|
--- a/netbox/netbox/graphql/scalars.py
|
||||||
|
+++ b/netbox/netbox/graphql/scalars.py
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
from graphene import Scalar
|
||||||
|
from graphql.language import ast
|
||||||
|
-from graphql.type.scalars import MAX_INT, MIN_INT
|
||||||
|
+from graphql.type.scalars import GRAPHQL_MAX_INT, GRAPHQL_MIN_INT
|
||||||
|
|
||||||
|
|
||||||
|
class BigInt(Scalar):
|
||||||
|
@@ -10,7 +10,7 @@ class BigInt(Scalar):
|
||||||
|
@staticmethod
|
||||||
|
def to_float(value):
|
||||||
|
num = int(value)
|
||||||
|
- if num > MAX_INT or num < MIN_INT:
|
||||||
|
+ if num > GRAPHQL_MAX_INT or num < GRAPHQL_MIN_INT:
|
||||||
|
return float(num)
|
||||||
|
return num
|
||||||
|
|
Loading…
Reference in a new issue