13 extraBuildInputs = plugins python3.pkgs;
15 python3.pkgs.buildPythonApplication rec {
21 src = fetchFromGitHub {
22 owner = "netbox-community";
24 rev = "refs/tags/v${version}";
28 patches = extraPatches;
30 propagatedBuildInputs = with python3.pkgs; [
37 django-graphiql-debug-toolbar
48 drf-spectacular-sidecar
51 swagger-spec-validator # from drf-yasg[validation]
64 social-auth-app-django
68 ] ++ extraBuildInputs;
70 buildInputs = with python3.pkgs; [
72 mkdocs-material-extensions
82 PYTHONPATH=$PYTHONPATH:netbox/
83 python -m mkdocs build
87 mkdir -p $out/opt/netbox
88 cp -r . $out/opt/netbox
89 chmod +x $out/opt/netbox/netbox/manage.py
90 makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \
91 --prefix PYTHONPATH : "$PYTHONPATH"
96 # PYTHONPATH of all dependencies used by the package
97 pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
98 gunicorn = python3.pkgs.gunicorn;
103 homepage = "https://github.com/netbox-community/netbox";
104 description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool";
105 mainProgram = "netbox";
106 license = lib.licenses.asl20;
107 knownVulnerabilities = (lib.optional eol "Netbox version ${version} is EOL; please upgrade by following the current release notes instructions.");
109 # Notice the missing `lib` in the inherit: it is using this function argument rather than a `with lib;` argument.
110 # If you replace this by `with lib;`, pay attention it does not inherit all maintainers in nixpkgs.