diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 1a58c8671f..faaeda78f8 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -31,5 +31,6 @@ mercurial = with pkgs; (mercurial.overridePythonAttrs (origAttrs: { propagatedBuildInputs = [python3Packages.hg-evolve python3Packages.pygit2]; })); + netbox = pkgs.python3Packages.callPackage ./netbox {}; } // (import ./heptapod-runner.nix args) // (import ./lightspeed args) diff --git a/nix/pkgs/netbox/default.nix b/nix/pkgs/netbox/default.nix new file mode 100644 index 0000000000..4caf593c4c --- /dev/null +++ b/nix/pkgs/netbox/default.nix @@ -0,0 +1,98 @@ +{ buildPythonApplication +, overrideScope +, fetchFromGitHub +, lib +, callPackage +, configuration ? "" +, psycopg2 +}: + +let + deps = overrideScope (callPackage ./python-packages.nix {}); +in +buildPythonApplication rec { + pname = "netbox"; + version = "3.0-beta2"; + + src = fetchFromGitHub { + owner = "netbox-community"; + repo = pname; + rev = "v${version}"; + sha256 = "05cwdkqs8vlpbn10pk8yj4a0ywp0x5h5ndf2a5zf4nlmg33d0sbi"; + }; + + propagatedBuildInputs = (with deps; [ + Django + django-cors-headers + django-debug-toolbar + django-filter + django-graphiql-debug-toolbar + django-mptt + django-pglocks + django-prometheus + django-redis + django-rq + django-tables2 + django-taggit + django-timezone-field + djangorestframework + drf-yasg + graphene-django + gunicorn + Jinja2 + Markdown + markdown-include + mkdocs-material + netaddr + pillow + pycryptodome + PyYAML + svgwrite + tablib + + django-storages + ]) ++ [ + psycopg2 + ]; + + format = "other"; + + buildPhase = '' + runHook preBuild + # Do nothing. + runHook postBuild + ''; + + passAsFile = [ "configuration" ]; + inherit configuration; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/netbox + cp -R . $out/share/netbox + PYVER="$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" + PYDIR="$out/lib/python$PYVER" + mkdir -p $PYDIR + ln -s $out/share/netbox/netbox $PYDIR/site-packages + mkdir -p $out/bin + cp $out/share/netbox/netbox/manage.py $out/bin/netbox-manage + + cat <<"EOF" >$out/bin/netbox-gunicorn + #!/usr/bin/python + import sys + from gunicorn.app.wsgiapp import run + if __name__ == '__main__': + sys.exit(run()) + EOF + chmod +x $out/bin/netbox-gunicorn + + cp $out/share/netbox/netbox/netbox/configuration.testing.py $out/share/netbox/netbox/netbox/configuration.py + PYTHONPATH=$PYDIR/site-packages:$PYTHONPATH python $out/bin/netbox-manage collectstatic --no-input + + cp $configurationPath $out/share/netbox/netbox/netbox/configuration.py + + runHook postInstall + ''; + + passthru.deps = deps; +} diff --git a/nix/pkgs/netbox/python-packages.nix b/nix/pkgs/netbox/python-packages.nix new file mode 100644 index 0000000000..dde138c337 --- /dev/null +++ b/nix/pkgs/netbox/python-packages.nix @@ -0,0 +1,1211 @@ +# Generated by pip2nix 0.8.0.dev1 +# See https://github.com/nix-community/pip2nix + +{ pkgs, fetchurl, fetchgit, fetchhg }: + +self: super: { + "Django" = super.buildPythonPackage rec { + pname = "Django"; + version = "3.2.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d5/9b/3514fae1e9d0c71044739dca5ed55f50443bd1309548b63603712365e6e9/Django-3.2.6-py3-none-any.whl"; + sha256 = "04qzllkmyl0g2fgdab55r7hv3vqswfdv32p77cgjj3ma54sl34kz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."asgiref" + self."pytz" + self."sqlparse" + ]; + }; + "Jinja2" = super.buildPythonPackage rec { + pname = "Jinja2"; + version = "3.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/80/21/ae597efc7ed8caaa43fb35062288baaf99a7d43ff0cf66452ddf47604ee6/Jinja2-3.0.1-py3-none-any.whl"; + sha256 = "193qm51bvhav6i4wqy53k2ay6q9c9rmxvzwa4f7npdg7a7dg41hz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."MarkupSafe" + ]; + }; + "Markdown" = super.buildPythonPackage rec { + pname = "Markdown"; + version = "3.3.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6e/33/1ae0f71395e618d6140fbbc9587cc3156591f748226075e0f7d6f9176522/Markdown-3.3.4-py3-none-any.whl"; + sha256 = "035jdlw72vss4lzvlslx7wfr4b43cf2fl03ani3pabyyc49bmhwn"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "MarkupSafe" = super.buildPythonPackage rec { + pname = "MarkupSafe"; + version = "2.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/MarkupSafe-2.0.1.tar.gz"; + sha256 = "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + #"Pillow" = super.buildPythonPackage rec { + # pname = "Pillow"; + # version = "8.3.1"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/8f/7d/1e9c2d8989c209edfd10f878da1af956059a1caab498e5bc34fa11b83f71/Pillow-8.3.1.tar.gz"; + # sha256 = "14n7wawxq6im3m8qdk6c0c9ixriybr6hhzxyzplfqp7wkf1m7b1c"; + # }; + # format = "setuptools"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = []; + #}; + "PyYAML" = super.buildPythonPackage rec { + pname = "PyYAML"; + version = "5.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz"; + sha256 = "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "Pygments" = super.buildPythonPackage rec { + pname = "Pygments"; + version = "2.10.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/78/c8/8d9be2f72d8f465461f22b5f199c04f7ada933add4dae6e2468133c17471/Pygments-2.10.0-py3-none-any.whl"; + sha256 = "1003l9kipymrk4n3nj8yxf5z1jr40q69gqmkqjrr5x3qmzk7zrmq"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "aniso8601" = super.buildPythonPackage rec { + pname = "aniso8601"; + version = "7.0.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/45/a4/b4fcadbdab46c2ec2d2f6f8b4ab3f64fd0040789ac7f065eba82119cd602/aniso8601-7.0.0-py2.py3-none-any.whl"; + sha256 = "0yqccz4cqq96y0hln02ksjva4j8zwf357vr7n8czf6gn97wln2ni"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "asgiref" = super.buildPythonPackage rec { + pname = "asgiref"; + version = "3.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/fe/66/577f32b54c50dcd8dec38447258e82ed327ecb86820d67ae7b3dea784f13/asgiref-3.4.1-py3-none-any.whl"; + sha256 = "052j8715bw39iywciicgfg5hxnsgmyvv7cg7fdb1fvwfj2m43hgz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + #"attrs" = super.buildPythonPackage rec { + # pname = "attrs"; + # version = "21.2.0"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/20/a9/ba6f1cd1a1517ff022b35acd6a7e4246371dfab08b8e42b829b6d07913cc/attrs-21.2.0-py2.py3-none-any.whl"; + # sha256 = "1cdh2v3scv9mi00195khsch3y6l8wvq0rmjsjmxdn85cv3b917hl"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = []; + #}; + "certifi" = super.buildPythonPackage rec { + pname = "certifi"; + version = "2021.5.30"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/05/1b/0a0dece0e8aa492a6ec9e4ad2fe366b511558cdc73fd3abc82ba7348e875/certifi-2021.5.30-py2.py3-none-any.whl"; + sha256 = "1n57ixzaln34d2qw55g7vh0hd6g033dkhqyxwwdz81kb8kwf9cah"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "charset-normalizer" = super.buildPythonPackage rec { + pname = "charset-normalizer"; + version = "2.0.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/33/53/b7f6126a2b9fd878b025fe3c40266cfaad696f312165008ce045bffa3fe7/charset_normalizer-2.0.4-py3-none-any.whl"; + sha256 = "12sx2xiqnjzmq37a5g32m5aj0c4s149sb551cqrj46axs7ni328c"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "click" = super.buildPythonPackage rec { + pname = "click"; + version = "8.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/76/0a/b6c5f311e32aeb3b406e03c079ade51e905ea630fc19d1262a46249c1c86/click-8.0.1-py3-none-any.whl"; + sha256 = "1dplwarq1x5xv9xx0j8izqd92j64kg3sf292g0np8d3kljj0597v"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "coreapi" = super.buildPythonPackage rec { + pname = "coreapi"; + version = "2.3.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/fc/3a/9dedaad22962770edd334222f2b3c3e7ad5e1c8cab1d6a7992c30329e2e5/coreapi-2.3.3-py2.py3-none-any.whl"; + sha256 = "1wz65vsnr9i6fz0qx6m2m6xq1bb3dxkfbvgr1pqp3qfksqcd2fdz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."coreschema" + self."itypes" + self."requests" + self."uritemplate" + ]; + }; + "coreschema" = super.buildPythonPackage rec { + pname = "coreschema"; + version = "0.0.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/93/08/1d105a70104e078718421e6c555b8b293259e7fc92f7e9a04869947f198f/coreschema-0.0.4.tar.gz"; + sha256 = "01qn9bfkklpjkr0zn6bd5fr372n1jd5p455scw4ap0nl0xh500wm"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Jinja2" + ]; + }; + "django-cors-headers" = super.buildPythonPackage rec { + pname = "django-cors-headers"; + version = "3.7.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/c2/72/5a8907328d6b508a2c7f90a9f3d5d17f368cb5a180169078d7bf7514919e/django_cors_headers-3.7.0-py3-none-any.whl"; + sha256 = "0brpkg29v4pznpk8la34w75wz6zr2pd4hi505cg2anp77lhv3hhs"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + ]; + }; + "django-debug-toolbar" = super.buildPythonPackage rec { + pname = "django-debug-toolbar"; + version = "3.2.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/26/0e/cc77743f07bf0812c3852385f94c76e6e671c4c8f1b248bb44dbdf157180/django_debug_toolbar-3.2.1-py3-none-any.whl"; + sha256 = "1fb7hh0yfzaxszz4fjmb3rq6hqw1cv0kk5ji1q713lz27wzfcng7"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."sqlparse" + ]; + }; + "django-filter" = super.buildPythonPackage rec { + pname = "django-filter"; + version = "2.4.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/71/2b/b2fe483c3095b6222725dd05f9ad9e6ed6cb7347c154fdbd80238d36f1a8/django_filter-2.4.0-py3-none-any.whl"; + sha256 = "1qdc6psvs7p6ix1hkl5avzaxikldi67qfkwgqirl5mdkpp7343g0"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + ]; + }; + "django-graphiql-debug-toolbar" = super.buildPythonPackage rec { + pname = "django-graphiql-debug-toolbar"; + version = "0.1.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/ae/d9/23634b7e329db01a7f9b43dfd6212ec682a06f58b314f8384eb38e8f2e3a/django-graphiql-debug-toolbar-0.1.4.tar.gz"; + sha256 = "1xb5b7ks43s00250lyiviph82y7v238lqz9mgrzdagwb84hvlvwl"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."django-debug-toolbar" + self."graphene-django" + ]; + }; + "django-js-asset" = super.buildPythonPackage rec { + pname = "django-js-asset"; + version = "1.2.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/aa/2d/98089cf51c8e83bc70723021390b94a3638a4a0ce30a47e2e70476b2095d/django_js_asset-1.2.2-py2.py3-none-any.whl"; + sha256 = "1pbb2v5lydfr8b7z82lpfainhcq3ffp68v23md655v3fy8bj1hcf"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "django-mptt" = super.buildPythonPackage rec { + pname = "django-mptt"; + version = "0.12.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/dd/0e/a57dff8797aac2c511e086e0acde4f78b300978459a9e22097e3962536b0/django_mptt-0.12.0-py2.py3-none-any.whl"; + sha256 = "0a6nzx466s8323mblrb722jlhf0bm1vfharfb0379sxwajh23d33"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."django-js-asset" + ]; + }; + "django-pglocks" = super.buildPythonPackage rec { + pname = "django-pglocks"; + version = "1.0.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/59/76/2c7d104151316077dcaa103e1d5652ded6c32798c8d706570fb7b48385cb/django-pglocks-1.0.4.tar.gz"; + sha256 = "08smnv249vngr4pfvf3j16dm6fd02q2klrv9cbs8w9mxpxpwcirw"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."six" + ]; + }; + "django-prometheus" = super.buildPythonPackage rec { + pname = "django-prometheus"; + version = "2.1.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/9b/1b/af5e3c82da897618c90836e7ff3c17f6c3f1dfb82ba33cc20815b2a1f8be/django_prometheus-2.1.0-py2.py3-none-any.whl"; + sha256 = "0cx92yzb00pkg2km3ml2rixpsa79my3mw2sl1klkd8qwvvpxcf63"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."prometheus-client" + ]; + }; + "django-redis" = super.buildPythonPackage rec { + pname = "django-redis"; + version = "5.0.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/44/b8/1d02e873ebca6ecb3d42fc55e4130daa7c839df79b9ad5c454f6e3361827/django_redis-5.0.0-py3-none-any.whl"; + sha256 = "1vlp7k3209pi3xpcwzqrpcvngn6zxj57s79d858lr5izvslrqwwp"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."redis" + ]; + }; + "django-rq" = super.buildPythonPackage rec { + pname = "django-rq"; + version = "2.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/c3/4b/7dc0d0e65ccb389280d47a21a52a093353f0c52e5ac3effe0a429c560f09/django_rq-2.4.1-py2.py3-none-any.whl"; + sha256 = "09yjblhl4368q6qigng90hidxklr7v0r5w9hyyxqq5rpqn1iz613"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."redis" + self."rq" + ]; + }; + "django-storages" = super.buildPythonPackage rec { + pname = "django-storages"; + version = "1.11.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f8/3d/9cf5b269de293098c1033ec27bc63e58f06164ca6deeda58d540536096a4/django_storages-1.11.1-py3-none-any.whl"; + sha256 = "103g762lgm38j53hj3dzh4fwfjw9hk89p15arw4h6yjhdn16b1zj"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + ]; + }; + "django-tables2" = super.buildPythonPackage rec { + pname = "django-tables2"; + version = "2.4.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/79/b1/a7a9c7a20cf71d529f39ab0a3a85ecaa6190e6555d5e26b9433406925f53/django_tables2-2.4.0-py2.py3-none-any.whl"; + sha256 = "14vmqprf6nq2baq0qhb92nixva4c8z4xfs1dsflqb0vh4ppyq40g"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + ]; + }; + "django-taggit" = super.buildPythonPackage rec { + pname = "django-taggit"; + version = "1.5.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/6f/ce/ad830d2410d5930025b11ec9f0b40cadbf42cb78335c4d5ba9bf246d0c07/django_taggit-1.5.1-py3-none-any.whl"; + sha256 = "16hlfzx51bhqm1s0yzd9q9rjq1zh7q4h036y84h16aar1g0yksfz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + ]; + }; + "django-timezone-field" = super.buildPythonPackage rec { + pname = "django-timezone-field"; + version = "4.1.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/fc/bb/6a90733e590dd908312427e9502c9ef7c5baeb55df2e7336992dea9de591/django_timezone_field-4.1.2-py3-none-any.whl"; + sha256 = "0dng5krpxnj8461n80x9lg5n8z3ai1bc3mih39rzb7311gj0cz49"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."pytz" + ]; + }; + "djangorestframework" = super.buildPythonPackage rec { + pname = "djangorestframework"; + version = "3.12.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d7/fe/18d96db43d440654e01a5831accd02948d373c160082bef186d6dc926255/djangorestframework-3.12.4-py3-none-any.whl"; + sha256 = "1bwsh5pf3xj5dnlfvj7b2s0ppqfzrf9zwsqdzq4hbbd54gv5j7bd"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + ]; + }; + "drf-yasg" = super.buildPythonPackage rec { + pname = "drf-yasg"; + version = "1.20.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/fc/5c/4584321c7a7fd85429f73fd4c3406b09309e3a071e250177739384a4ab48/drf_yasg-1.20.0-py2.py3-none-any.whl"; + sha256 = "0rw2gxmxmbsvvyh4faa985jpga2vk8xbw1zl3b8shcarhyqyawlb"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."coreapi" + self."coreschema" + self."djangorestframework" + self."inflection" + self."packaging" + self."ruamel.yaml" + self."swagger-spec-validator" + self."uritemplate" + ]; + }; + "ghp-import" = super.buildPythonPackage rec { + pname = "ghp-import"; + version = "2.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/72/60/50a903ae49f4ff2731053de314598ac0cb1f470cd68bb7f98d6dfd2af2c8/ghp-import-2.0.1.tar.gz"; + sha256 = "10s4ggd6n0qx7lq660dqmlmdb35rqgiybk5kvx77s3vfrvmf4gbm"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."python-dateutil" + ]; + }; + "graphene" = super.buildPythonPackage rec { + pname = "graphene"; + version = "2.1.9"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/ef/a2/b3e68706bf45abc2f9d70f099a4b4ca6305779577f4a03458d78fb39cd42/graphene-2.1.9-py2.py3-none-any.whl"; + sha256 = "0s08maz9gdd1hcmigjaq9wz0a1x6lgqmq59ipi910mbw4fqnwi1x"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."aniso8601" + self."graphql-core" + self."graphql-relay" + self."six" + ]; + }; + "graphene-django" = super.buildPythonPackage rec { + pname = "graphene-django"; + version = "2.15.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/eb/aa/c40236831391abc1f331b79bdb7cc72ce17f63662fc9e261264852e8fe52/graphene_django-2.15.0-py2.py3-none-any.whl"; + sha256 = "1018p6x82jq3vxn6xslqgl7psaagmpsaiwngk9jch28cbwcisrq2"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Django" + self."graphene" + self."graphql-core" + self."promise" + self."singledispatch" + self."six" + self."text-unidecode" + ]; + }; + "graphql-core" = super.buildPythonPackage rec { + pname = "graphql-core"; + version = "2.3.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/11/71/d51beba3d8986fa6d8670ec7bcba989ad6e852d5ae99d95633e5dacc53e7/graphql_core-2.3.2-py2.py3-none-any.whl"; + sha256 = "1bavhaayjzsc2zl1bcjdw757a6bcqziwiylmlp2k0pjfa72bmja4"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."promise" + self."rx" + self."six" + ]; + }; + "graphql-relay" = super.buildPythonPackage rec { + pname = "graphql-relay"; + version = "2.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/94/48/6022ea2e89cb936c3b933a0409c6e29bf8a68c050fe87d97f98aff6e5e9e/graphql_relay-2.0.1-py3-none-any.whl"; + sha256 = "0gci1phs4g8abym2w6qhy0nc2yhk47ai2dg7swa3195rdnw4qldc"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."graphql-core" + self."promise" + self."six" + ]; + }; + "gunicorn" = super.buildPythonPackage rec { + pname = "gunicorn"; + version = "20.1.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/e4/dd/5b190393e6066286773a67dfcc2f9492058e9b57c4867a95f1ba5caf0a83/gunicorn-20.1.0-py3-none-any.whl"; + sha256 = "0zl0g83a90j8gdky0hy43j4d3rd0cxban5gvri52ijxivd3lbk4x"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."setuptools" + ]; + }; + "idna" = super.buildPythonPackage rec { + pname = "idna"; + version = "3.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/d7/77/ff688d1504cdc4db2a938e2b7b9adee5dd52e34efbd2431051efc9984de9/idna-3.2-py3-none-any.whl"; + sha256 = "0ynxnv3raplspvcsqly99m6b33s2a5l6zq28rcs116c4w9150iql"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + #"importlib-metadata" = super.buildPythonPackage rec { + # pname = "importlib-metadata"; + # version = "4.6.4"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/c0/72/4512a88e402d4dc3bab49a845130d95ac48936ef3a9469b55cc79a60d84d/importlib_metadata-4.6.4-py3-none-any.whl"; + # sha256 = "1mcr5aka0bxvv2ikyd1apwvbpcllpa7dv80m8rcw8jrsybz5flgd"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = [ + # self."zipp" + # ]; + #}; + "inflection" = super.buildPythonPackage rec { + pname = "inflection"; + version = "0.5.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/59/91/aa6bde563e0085a02a435aa99b49ef75b0a4b062635e606dab23ce18d720/inflection-0.5.1-py2.py3-none-any.whl"; + sha256 = "18m80mk55fd1p9dnl1zil1i9p5a2602kvb39vrdg791q15j2p2zk"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "itypes" = super.buildPythonPackage rec { + pname = "itypes"; + version = "1.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/3f/bb/3bd99c7cd34d4a123b2903e16da364f6d2078b1c3a3530a8ad105c668104/itypes-1.2.0-py2.py3-none-any.whl"; + sha256 = "1ih4vn34q6abk83j72xl1pw91x08sjr74dkpcbprmll9r9r6inh3"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "jsonschema" = super.buildPythonPackage rec { + pname = "jsonschema"; + version = "3.2.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl"; + sha256 = "0qyidiicwn27ya7r4q7cjbra8gna5vkwnfg1kkp7nmvg47w3qnsf"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."attrs" + self."pyrsistent" + self."setuptools" + self."six" + ]; + }; + "markdown-include" = super.buildPythonPackage rec { + pname = "markdown-include"; + version = "0.6.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/34/ce/289d5d459c274a59379f79af95f3f36ae29cb9d787206ad9b45dda48e3ce/markdown-include-0.6.0.tar.gz"; + sha256 = "18p4qfhazvskcg6xsdv1np8m1gc1llyabp311xzhqy7p6q76hpbg"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Markdown" + ]; + }; + "mergedeep" = super.buildPythonPackage rec { + pname = "mergedeep"; + version = "1.3.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/2c/19/04f9b178c2d8a15b076c8b5140708fa6ffc5601fb6f1e975537072df5b2a/mergedeep-1.3.4-py3-none-any.whl"; + sha256 = "01q3xxwdg2w9blbv6lf92x6kihr47p8awmbcygcc099bfi85fxvh"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "mkdocs" = super.buildPythonPackage rec { + pname = "mkdocs"; + version = "1.2.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/5e/b6/5afe2978230b873e55da31b0ee2312ec0379780a8d61e6379d40dca3eb90/mkdocs-1.2.2-py3-none-any.whl"; + sha256 = "1zzh6xhlijd58vd73jgbg9cmksdm290ypfafnpz6lx7c2y7gy6fh"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Jinja2" + self."Markdown" + self."PyYAML" + self."click" + self."ghp-import" + self."importlib-metadata" + self."mergedeep" + self."packaging" + self."pyyaml-env-tag" + self."watchdog" + ]; + }; + "mkdocs-material" = super.buildPythonPackage rec { + pname = "mkdocs-material"; + version = "7.2.4"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/8f/1b/0bdf10d51ffc77a35db23b8c2004dc4eb766bc69154b42767f6dd81b89a1/mkdocs_material-7.2.4-py2.py3-none-any.whl"; + sha256 = "0dxqd7sy83vjhwbgl9lwbyv5gz32q0plrhc9gvacg1dlhr1chm7m"; + }; + prePatch = '' + cp "${self."mkdocs-material-extensions".src}" "dist/$(stripHash "${self."mkdocs-material-extensions".src}")" + ''; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Markdown" + self."Pygments" + self."mkdocs" + self."pymdown-extensions" + ]; + }; + "mkdocs-material-extensions" = super.buildPythonPackage rec { + pname = "mkdocs-material-extensions"; + version = "1.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/52/1c/d44c75a584e19a6b63d20befe6ac282a8cc092bf1299dd3b225fd3c3e239/mkdocs_material_extensions-1.0.1-py3-none-any.whl"; + sha256 = "0f533ycgmxyswkfbjqhf26f6139d1dffqmsnh38sd2ili1x8036r"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."mkdocs-material" + ]; + }; + "netaddr" = super.buildPythonPackage rec { + pname = "netaddr"; + version = "0.8.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/ff/cd/9cdfea8fc45c56680b798db6a55fa60a22e2d3d3ccf54fc729d083b50ce4/netaddr-0.8.0-py2.py3-none-any.whl"; + sha256 = "1b4hz5wazwj5ip4j3z2jrrbp8v7xb1gp73azbrp6blij5hix0rln"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + #"packaging" = super.buildPythonPackage rec { + # pname = "packaging"; + # version = "21.0"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/3c/77/e2362b676dc5008d81be423070dd9577fa03be5da2ba1105811900fda546/packaging-21.0-py3-none-any.whl"; + # sha256 = "057z2kyp5f66w7gz9ph0h3d4f20gfvgblsadr4ff6m8d4bwm8qn8"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = [ + # self."pyparsing" + # ]; + #}; + "prometheus-client" = super.buildPythonPackage rec { + pname = "prometheus-client"; + version = "0.11.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/09/da/4e8471ff825769581593b5b84769d32f58e5373b59fccaf355d3529ad530/prometheus_client-0.11.0-py2.py3-none-any.whl"; + sha256 = "1cmir8x3djcj820gih5ha8vfd8qpfx5whpyfm2fkkcayh5vbq55h"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "promise" = super.buildPythonPackage rec { + pname = "promise"; + version = "2.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/cf/9c/fb5d48abfe5d791cd496e4242ebcf87a4bb2e0c3dcd6e0ae68c11426a528/promise-2.3.tar.gz"; + sha256 = "1l4kknj97dj5pxfpsz3ln78x9a843561c740b1m4pfi3qlvq7lfz"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."six" + ]; + }; + "psycopg2-binary" = super.buildPythonPackage rec { + pname = "psycopg2-binary"; + version = "2.9.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/14/65/223a5b4146b1d5d5ab66f16ef194916a1ed9720da1f118d7bfb60b8f2bea/psycopg2-binary-2.9.1.tar.gz"; + sha256 = "0wzp65d1gs6s9ag421vqidk86mvbjacqix31pw708zl3m6jiq8mh"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "pycryptodome" = super.buildPythonPackage rec { + pname = "pycryptodome"; + version = "3.10.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/88/7f/740b99ffb8173ba9d20eb890cc05187677df90219649645aca7e44eb8ff4/pycryptodome-3.10.1.tar.gz"; + sha256 = "0ws6ivk5v6bs57ak8hwjyjf0jqcdl87bkka3z06ijpqcb033lbiy"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "pymdown-extensions" = super.buildPythonPackage rec { + pname = "pymdown-extensions"; + version = "8.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/35/fa/6631b9aeb25e1bb62bf77c48c86b1677da98a52360cb9b5559dda8d08edb/pymdown_extensions-8.2-py3-none-any.whl"; + sha256 = "0q15vjn093xn1vdywvs6ry2np1jly15la8y9y8c5a5k1xpc5450l"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."Markdown" + ]; + }; + #"pyparsing" = super.buildPythonPackage rec { + # pname = "pyparsing"; + # version = "2.4.7"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl"; + # sha256 = "12y8xwjb118a4jqvvfg9k90kqg03n4d3ygb5csz0l81wxy4pb7gg"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = []; + #}; + "pyrsistent" = super.buildPythonPackage rec { + pname = "pyrsistent"; + version = "0.18.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f4/d7/0fa558c4fb00f15aabc6d42d365fcca7a15fcc1091cd0f5784a14f390b7f/pyrsistent-0.18.0.tar.gz"; + sha256 = "0jzbc3m427wg3r6vxgmcw5517fqpnpakidm7885r1hpq2q97hg3p"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "python-dateutil" = super.buildPythonPackage rec { + pname = "python-dateutil"; + version = "2.8.2"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl"; + sha256 = "1aaxjfp4lrz8c6qls3vdhw554lan3khy9afyvdcvrssk6kf067cn"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."six" + ]; + }; + "pytz" = super.buildPythonPackage rec { + pname = "pytz"; + version = "2021.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/70/94/784178ca5dd892a98f113cdd923372024dc04b8d40abe77ca76b5fb90ca6/pytz-2021.1-py2.py3-none-any.whl"; + sha256 = "1607gl2x9290ks5sa6dvqw9dgg1kwdf9fj9xcb9jw19nfwzcw47b"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "pyyaml-env-tag" = super.buildPythonPackage rec { + pname = "pyyaml-env-tag"; + version = "0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/5a/66/bbb1dd374f5c870f59c5bb1db0e18cbe7fa739415a24cbd95b2d1f5ae0c4/pyyaml_env_tag-0.1-py3-none-any.whl"; + sha256 = "0s905i9h10l637dwrax7iav3ky6b65h8ih870b36hkcaxini0cdg"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."PyYAML" + ]; + }; + "redis" = super.buildPythonPackage rec { + pname = "redis"; + version = "3.5.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a7/7c/24fb0511df653cf1a5d938d8f5d19802a88cef255706fdda242ff97e91b7/redis-3.5.3-py2.py3-none-any.whl"; + sha256 = "094zkp2q0mcx5j6gwjkyf94n3hd61ka0jfllimny3krh8n67has3"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "requests" = super.buildPythonPackage rec { + pname = "requests"; + version = "2.26.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/92/96/144f70b972a9c0eabbd4391ef93ccd49d0f2747f4f6a2a2738e99e5adc65/requests-2.26.0-py2.py3-none-any.whl"; + sha256 = "097xdqddqm6ikzf30867irmrq3wg1s8nz450512wspnd7r8lc4kc"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."certifi" + self."charset-normalizer" + self."idna" + self."urllib3" + ]; + }; + "rq" = super.buildPythonPackage rec { + pname = "rq"; + version = "1.9.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/3c/98/7a4fd325996fb9679f98054304505a54c7551965a819f5f438a75b831ab8/rq-1.9.0-py2.py3-none-any.whl"; + sha256 = "1mvr56k0ifxnv8a1z52hk4vc29zcf61cvynz2sn1wvxydmqfkwbs"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."click" + self."redis" + ]; + }; + "ruamel.yaml" = super.buildPythonPackage rec { + pname = "ruamel.yaml"; + version = "0.17.10"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/0e/57/19361b93542a1bb071fe8b7dd5ae792de6e8ab86c707aa2c44db08c60b99/ruamel.yaml-0.17.10-py3-none-any.whl"; + sha256 = "05gq8zdv5x4030ynbq5dbd805kr622mzsvb0c5w8p7iyhl1vgfgz"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."ruamel.yaml.clib" + ]; + }; + "ruamel.yaml.clib" = super.buildPythonPackage rec { + pname = "ruamel.yaml.clib"; + version = "0.2.6"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/8b/25/08e5ad2431a028d0723ca5540b3af6a32f58f25e83c6dda4d0fcef7288a3/ruamel.yaml.clib-0.2.6.tar.gz"; + sha256 = "1gdchmdngbni9mv6f62xb7ii1kjr8wvkqq859xwj1fws8g709xjg"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "rx" = super.buildPythonPackage rec { + pname = "rx"; + version = "1.6.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/33/0f/5ef4ac78e2a538cc1b054eb86285fe0bf7a5dbaeaac2c584757c300515e2/Rx-1.6.1-py2.py3-none-any.whl"; + sha256 = "01a1p3dgm9ikh6y1ymdb04rra17p4qrvf4r01igak0g8qwmmjmvk"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "singledispatch" = super.buildPythonPackage rec { + pname = "singledispatch"; + version = "3.7.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/3f/09/2a17c6505a8373229cb3de6161e3af74ff90afcf4516719aa6cf32fad151/singledispatch-3.7.0-py2.py3-none-any.whl"; + sha256 = "12d9kb0krk6ppmi44nm6qbnqcayxgcdhzhjgdmnmj8lagjlsyxxw"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."six" + ]; + }; + #"six" = super.buildPythonPackage rec { + # pname = "six"; + # version = "1.16.0"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl"; + # sha256 = "0m02dsi8lvrjf4bi20ab6lm7rr6krz7pg6lzk3xjs2l9hqfjzfwa"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = []; + #}; + "sqlparse" = super.buildPythonPackage rec { + pname = "sqlparse"; + version = "0.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/14/05/6e8eb62ca685b10e34051a80d7ea94b7137369d8c0be5c3b9d9b6e3f5dae/sqlparse-0.4.1-py3-none-any.whl"; + sha256 = "1l2f616scnhbx7nkzvwmiqvpjh97x11kz1v1bbqs3mnvk8vxwz01"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "svgwrite" = super.buildPythonPackage rec { + pname = "svgwrite"; + version = "1.4.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/74/e8/5289be72545cd7eeacd67c9240995ce6513128b1fed66368f0137b0eddf5/svgwrite-1.4.1-py3-none-any.whl"; + sha256 = "1l1iysgd12lnk75n1jj0fndm255j8r0sbwpryimklm4w3lm6a8ab"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "swagger-spec-validator" = super.buildPythonPackage rec { + pname = "swagger-spec-validator"; + version = "2.7.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/09/de/e78cefbf5838b434b63a789264b79821cb2267f1498fbed23ef8590133e4/swagger_spec_validator-2.7.3-py2.py3-none-any.whl"; + sha256 = "1sr9bvnqah65p637gdcxii0xcxmqrs2lzivwy80wfn60wg3lwlfi"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = [ + self."PyYAML" + self."jsonschema" + self."six" + ]; + }; + "tablib" = super.buildPythonPackage rec { + pname = "tablib"; + version = "3.0.0"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/16/85/078fc037b15aa1120d6a0287ec9d092d93d632ab01a0e7a3e69b4733da5e/tablib-3.0.0-py3-none-any.whl"; + sha256 = "087bb8zf3jivbidx0srq0srh25i7ip1ygsmb3x6yrmyx3jc41aj1"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "text-unidecode" = super.buildPythonPackage rec { + pname = "text-unidecode"; + version = "1.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/a6/a5/c0b6468d3824fe3fde30dbb5e1f687b291608f9473681bbf7dabbf5a87d7/text_unidecode-1.3-py2.py3-none-any.whl"; + sha256 = "1s12m0s73djhjcc1i2w8hx94ak2glqmiqwr32qj3anc9ic7g248k"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + "uritemplate" = super.buildPythonPackage rec { + pname = "uritemplate"; + version = "3.0.1"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/bf/0c/60d82c077998feb631608dca3cc1fe19ac074e772bf0c24cf409b977b815/uritemplate-3.0.1-py2.py3-none-any.whl"; + sha256 = "0kw9ll8xkaz0glzwa4zmmhh28sh31qmqji88c091zvcf7wzhqqh7"; + }; + format = "wheel"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + #"urllib3" = super.buildPythonPackage rec { + # pname = "urllib3"; + # version = "1.26.6"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/5f/64/43575537846896abac0b15c3e5ac678d787a4021e906703f1766bfb8ea11/urllib3-1.26.6-py2.py3-none-any.whl"; + # sha256 = "1m6823gifpdhma46q3rg3vn4s406138qswd776qsqnb129r8dyrr"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = []; + #}; + "watchdog" = super.buildPythonPackage rec { + pname = "watchdog"; + version = "2.1.3"; + src = fetchurl { + url = "https://files.pythonhosted.org/packages/f5/c2/d1ff8343cd38138561d2f08aba7b0566020485346097019f3a87773c96fc/watchdog-2.1.3.tar.gz"; + sha256 = "0ifx2mj63bbh97nbsvy9rarmldkc6lnlqrkkp2s6vaq2hs76l8z5"; + }; + format = "setuptools"; + doCheck = false; + buildInputs = []; + checkInputs = []; + nativeBuildInputs = []; + propagatedBuildInputs = []; + }; + #"zipp" = super.buildPythonPackage rec { + # pname = "zipp"; + # version = "3.5.0"; + # src = fetchurl { + # url = "https://files.pythonhosted.org/packages/92/d9/89f433969fb8dc5b9cbdd4b4deb587720ec1aeb59a020cf15002b9593eef/zipp-3.5.0-py3-none-any.whl"; + # sha256 = "18whjgls10yan9vhcd9544g9kjj1123y7fdq1ic8kqwpfylgsz4m"; + # }; + # format = "wheel"; + # doCheck = false; + # buildInputs = []; + # checkInputs = []; + # nativeBuildInputs = []; + # propagatedBuildInputs = []; + #}; +} diff --git a/ops/nixos/bvm-netbox/default.nix b/ops/nixos/bvm-netbox/default.nix index 6443121948..f492c6156d 100644 --- a/ops/nixos/bvm-netbox/default.nix +++ b/ops/nixos/bvm-netbox/default.nix @@ -2,8 +2,131 @@ # # SPDX-License-Identifier: Apache-2.0 -{ config, ... }: -{ +{ config, depot, pkgs, ... }: +let + inherit (depot.ops) secrets; + + netbox = depot.nix.pkgs.netbox.override { + configuration = '' + ALLOWED_HOSTS = ["netbox.int.lukegb.com"] + DATABASE = { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'netbox', + } + + REDIS = { + 'tasks': { + 'HOST': 'localhost', + 'PORT': 6379, + 'DATABASE': 0, + 'SSL': False, + }, + 'caching': { + 'HOST': 'localhost', + 'PORT': 6379, + 'DATABASE': 1, + 'SSL': False, + }, + } + + SECRET_KEY = '${secrets.netbox.secretKey}' + + ADMINS = [] + ALLOWED_URL_SCHEMES = ( + 'file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp', + ) + + BANNER_TOP = "" + BANNER_BOTTOM = "" + BANNER_LOGIN = "" + BASE_PATH = "" + + CHANGELOG_RETENTION = 0 + + CORS_ORIGIN_ALLOW_ALL = False + CORS_ORIGIN_WHITELIST = [] + CORS_ORIGIN_REGEX_WHITELIST = [] + + CUSTOM_VALIDATORS = {} + + DEBUG = False + + EMAIL = {} + + ENFORCE_GLOBAL_UNIQUE = True + + EXEMPT_VIEW_PERMISSIONS = [] + + GRAPHQL_ENABLED = False + + INTERNAL_IPS = ('127.0.0.1', '::1') + + LOGGING = {} + + LOGIN_REQUIRED = True + LOGIN_TIMEOUT = None + + MAINTENANCE_MODE = False + + MAPS_URL = 'https://maps.google.com/?q=' + + MAX_PAGE_SIZE = 1000 + + MEDIA_ROOT = '/srv/netbox/media' + + STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage' + STORAGE_CONFIG = { + 'AWS_ACCESS_KEY_ID': "${secrets.netbox.s3.accessKey}", + 'AWS_SECRET_ACCESS_KEY': "${secrets.netbox.s3.secretAccessKey}", + 'AWS_STORAGE_BUCKET_NAME': 'netbox', + 'AWS_S3_ENDPOINT_URL': 'https://objdump.zxcvbnm.ninja', + 'AWS_S3_REGION_NAME': 'london', + } + + METRICS_ENABLED = False + + NAPALM_USERNAME = "" + NAPALM_PASSWORD = "" + NAPALM_TIMEOUT = 30 + NAPALM_ARGS = {} + + PAGINATE_COUNT = 50 + + PLUGINS = [] + + PREFER_IPV4 = False + + RACK_ELEVATION_DEFAULT_UNIT_HEIGHT = 22 + RACK_ELEVATION_DEFAULT_UNIT_WIDTH = 220 + + REMOTE_AUTH_ENABLED = False + REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend' + REMOTE_AUTH_HEADER = 'HTTP_REMOTE_USER' + REMOTE_AUTH_AUTO_CREATE_USER = True + REMOTE_AUTH_DEFAULT_GROUPS = [] + REMOTE_AUTH_DEFAULT_PERMISSIONS = {} + + RELEASE_CHECK_URL = None + + REPORTS_ROOT = '/srv/netbox/reports' + + RQ_DEFAULT_TIMEOUT = 300 + + SCRIPTS_ROOT = '/srv/netbox/scripts' + + SESSION_COOKIE_NAME = 'netboxsess' + + TIME_ZONE = 'UTC' + + DATE_FORMAT = 'Y-m-d' + SHORT_DATE_FORMAT = 'Y-m-d' + TIME_FORMAT = 'g:i a' + SHORT_TIME_FORMAT = 'H:i:s' + DATETIME_FORMAT = 'Y-m-d g:i a' + SHORT_DATETIME_FORMAT = 'Y-m-d H:i' + ''; + }; +in { imports = [ ../lib/bvm.nix ]; @@ -49,5 +172,53 @@ group = "netbox"; }; + environment.systemPackages = with pkgs; [ + netbox + ]; + + systemd.services.netbox-rq = { + wantedBy = [ "multi-user.target" ]; + after = [ "network-online.target" ]; + serviceConfig = { + Type = "simple"; + User = "netbox"; + Group = "netbox"; + WorkingDirectory = "/srv/netbox"; + ExecStart = "${netbox}/bin/netbox-manage rqworker high default low"; + Restart = "on-failure"; + RestartSec = 30; + PrivateTmp = true; + }; + }; + + systemd.services.netbox = { + wantedBy = [ "multi-user.target" ]; + after = [ "network-online.target" ]; + serviceConfig = { + Type = "simple"; + User = "netbox"; + Group = "netbox"; + WorkingDirectory = "/srv/netbox"; + PIDFile = "/srv/netbox/gunicorn.pid"; + ExecStart = "${netbox}/bin/netbox-gunicorn --pid /srv/netbox/gunicorn.pid --config ${netbox}/share/netbox/contrib/gunicorn.py netbox.wsgi"; + Restart = "on-failure"; + RestartSec = 30; + PrivateTmp = true; + }; + }; + + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts."netbox.int.lukegb.com" = { + locations."/static/" = { + alias = "${netbox}/share/netbox/netbox/static/"; + }; + locations."/" = { + proxyPass = "http://127.0.0.1:8001"; + }; + }; + }; + system.stateVersion = "21.05"; } diff --git a/ops/nixos/etheroute-lon01/default.nix b/ops/nixos/etheroute-lon01/default.nix index 8156962712..17ff7c39e6 100644 --- a/ops/nixos/etheroute-lon01/default.nix +++ b/ops/nixos/etheroute-lon01/default.nix @@ -254,6 +254,7 @@ in { }) (service "bvm-ipfs:5001" "ipfs.int.lukegb.com" {}) (service "bvm-ipfs:8080" "ipfs-gw.int.lukegb.com" {}) + (service "bvm-netbox:80" "netbox.int.lukegb.com" {}) ]; }; }; diff --git a/web/int/index.html b/web/int/index.html index e79782b344..f96ea2d8d3 100644 --- a/web/int/index.html +++ b/web/int/index.html @@ -22,8 +22,8 @@ SPDX-License-Identifier: Apache-2.0
  • twitterchiver
  • hg (heptapod)
  • rundeck
  • +
  • netbox
  • - -

    Log out

    +

    Log out