diff --git a/pkgs/development/python-modules/flask-gravatar/default.nix b/pkgs/development/python-modules/flask-gravatar/default.nix new file mode 100644 index 0000000000000..8b981d8816b3c --- /dev/null +++ b/pkgs/development/python-modules/flask-gravatar/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonAtLeast +, flask +, pytest-runner +}: + +buildPythonPackage rec { + pname = "Flask-Gravatar"; + version = "0.5.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "YGZfMcLGEokdto/4Aek+06CIHGyOw0arxk0qmSP1YuE="; + }; + + # depends on pytest-pep8 which is abandoned, not going to bother + doCheck = false; + + preBuild = '' + sed "s|tests_require=tests_require,||g" -i setup.py + sed "s|extras_require=extras_require,||g" -i setup.py + sed "s|setup_requires=setup_requires,||g" -i setup.py + ''; + + propagatedBuildInputs = [ + flask + ]; + + meta = with lib; { + homepage = "https://github.com/zzzsochi/Flask-Gravatar"; + description = "Small and simple integration of gravatar into flask"; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = with maintainers; [ mkg20001 ]; + }; +} diff --git a/pkgs/development/python-modules/flask-paranoid/default.nix b/pkgs/development/python-modules/flask-paranoid/default.nix new file mode 100644 index 0000000000000..6a37ffdf571e8 --- /dev/null +++ b/pkgs/development/python-modules/flask-paranoid/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonAtLeast +, flask +, pytest +, pytest-runner +}: + +buildPythonPackage rec { + pname = "Flask-Paranoid"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "ou6SV2QuAlTxFXikqlShpyUWemQc+gh5Mw1HfsNwx0k="; + }; + + propagatedBuildInputs = [ + flask + ]; + + checkInputs = [ + pytest + pytest-runner + ]; + + doCheck = false; + + meta = with lib; { + homepage = "https://github.com/miguelgrinberg/flask-paranoid/"; + description = "Simple user session protection"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ mkg20001 ]; + }; +} diff --git a/pkgs/development/python-modules/flask-security-too/default.nix b/pkgs/development/python-modules/flask-security-too/default.nix new file mode 100644 index 0000000000000..efc32a0489676 --- /dev/null +++ b/pkgs/development/python-modules/flask-security-too/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonAtLeast +, flask +, blinker +, itsdangerous +, flask_principal +, passlib +, email_validator +, flask_wtf +, flask_login +, pytest +}: + +buildPythonPackage rec { + pname = "Flask-Security-Too"; + version = "4.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "wpZ/zgjL4qHGrajqr8cXYm2Q8pbvp6F/hZwT9Gv+8eA="; + }; + + propagatedBuildInputs = [ + flask + flask_login + flask_principal + flask_wtf + email_validator + itsdangerous + passlib + blinker + ]; + + doCheck = false; + + checkInputs = [ + pytest + ]; + + meta = with lib; { + homepage = "https://pypi.org/project/Flask-Security-Too/"; + description = "Simple security for Flask apps (fork)"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ mkg20001 ]; + }; +} diff --git a/pkgs/development/python-modules/httpagentparser/default.nix b/pkgs/development/python-modules/httpagentparser/default.nix new file mode 100644 index 0000000000000..28acbd250aad1 --- /dev/null +++ b/pkgs/development/python-modules/httpagentparser/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonAtLeast +, tox +}: + +buildPythonPackage rec { + pname = "httpagentparser"; + version = "1.9.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "73Y9MZk912GCWs7myLNL4yuVzxZ10cc8PNNfnlKDGyY="; + }; + + checkInputs = [ + tox + ]; + + doCheck = false; + + meta = with lib; { + homepage = "https://pypi.org/project/httpagentparser/"; + description = "Extracts OS Browser etc information from http user agent string"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ mkg20001 ]; + }; +} diff --git a/pkgs/development/python-modules/speaklater3/default.nix b/pkgs/development/python-modules/speaklater3/default.nix new file mode 100644 index 0000000000000..5fc9aed24ad3f --- /dev/null +++ b/pkgs/development/python-modules/speaklater3/default.nix @@ -0,0 +1,22 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "speaklater3"; + version = "1.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "ySYdS2taMEZyMS0esImb4Cj6yRdgGQqA/szTHTo7UEI="; + }; + + meta = with lib; { + description = "Implements a lazy string for python useful for use with gettext"; + homepage = "https://github.com/mitsuhiko/speaklater"; + license = licenses.bsd0; + maintainers = with maintainers; [ mkg20001 ]; + }; + +} diff --git a/pkgs/tools/admin/pgadmin/default.nix b/pkgs/tools/admin/pgadmin/default.nix new file mode 100644 index 0000000000000..97678b64a2b32 --- /dev/null +++ b/pkgs/tools/admin/pgadmin/default.nix @@ -0,0 +1,73 @@ +{ stdenv +, lib +, python3 +, fetchurl +, zlib +, python3Packages +}: + +python3Packages.buildPythonApplication rec { + pname = "pgadmin"; + version = "5.4"; + + src = fetchurl { + url = "https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v${version}/source/pgadmin4-${version}.tar.gz"; + sha256 = "N0+fnS0ndH/bqwVMra6kSvKoxRCGPCvLs8aZ0PvWv0o="; + }; + + # from Dockerfile + CPPFLAGS="-DPNG_ARM_NEON_OPT=0"; + + format = "other"; + + postPatch = '' + # sed -r 's|LC_ALL=en_US.UTF-8.* Makefile.sphinx .*$|true|g' -i Makefile + patchShebangs . + ''; + + buildInputs = [ + zlib + ]; + + propagatedBuildInputs = with python3Packages; [ + flask + flask-gravatar + flask_login + flask_mail + flask_migrate + flask_sqlalchemy + flask_wtf + flask-compress + passlib + pytz + simplejson + six + (lib.hiPrio speaklater3) + sqlparse + wtforms + flask-paranoid + psutil + psycopg2 + python-dateutil + sqlalchemy + itsdangerous + flask-security-too + bcrypt + cryptography + sshtunnel + ldap3 + flask-babelex + gssapi + flask-socketio + eventlet + httpagentparser + user-agents + ]; + + meta = with lib; { + description = "Administration and development platform for PostgreSQL"; + homepage = "https://www.pgadmin.org/"; + license = licenses.mit; + maintainers = with maintainers; [ mkg20001 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e3d3178ea0b3..b35493b4d1a53 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31183,7 +31183,9 @@ in pgmanage = callPackage ../applications/misc/pgmanage { }; - pgadmin = callPackage ../applications/misc/pgadmin { + pgadmin4 = callPackage ../tools/admin/pgadmin { }; + + pgadmin3 = callPackage ../applications/misc/pgadmin { openssl = openssl_1_0_2; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ec1b8aaad6f79..e58c34ccde9dd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2577,6 +2577,8 @@ in { flask_elastic = callPackage ../development/python-modules/flask-elastic { }; + flask-gravatar = callPackage ../development/python-modules/flask-gravatar { }; + flask-httpauth = callPackage ../development/python-modules/flask-httpauth { }; flask-jwt-extended = callPackage ../development/python-modules/flask-jwt-extended { }; @@ -2597,6 +2599,8 @@ in { flask-paginate = callPackage ../development/python-modules/flask-paginate { }; + flask-paranoid = callPackage ../development/python-modules/flask-paranoid { }; + flask_principal = callPackage ../development/python-modules/flask-principal { }; flask-pymongo = callPackage ../development/python-modules/Flask-PyMongo { }; @@ -2613,6 +2617,8 @@ in { flask-seasurf = callPackage ../development/python-modules/flask-seasurf { }; + flask-security-too = callPackage ../development/python-modules/flask-security-too { }; + flask-silk = callPackage ../development/python-modules/flask-silk { }; flask-socketio = callPackage ../development/python-modules/flask-socketio { }; @@ -3322,6 +3328,8 @@ in { httpauth = callPackage ../development/python-modules/httpauth { }; + httpagentparser = callPackage ../development/python-modules/httpagentparser { }; + httpbin = callPackage ../development/python-modules/httpbin { }; httpcore = callPackage ../development/python-modules/httpcore { }; @@ -8094,6 +8102,8 @@ in { speaklater = callPackage ../development/python-modules/speaklater { }; + speaklater3 = callPackage ../development/python-modules/speaklater3 { }; + spectral-cube = callPackage ../development/python-modules/spectral-cube { }; speedtest-cli = callPackage ../development/python-modules/speedtest-cli { };