diff options
author | Flakebi <flakebi@t-online.de> | 2021-12-17 10:33:40 +0100 |
---|---|---|
committer | Sebastian Neubauer <Sebastian.Neubauer@amd.com> | 2021-12-17 10:33:40 +0100 |
commit | 368b22d09b1511189f941f8976bfab41dcd651e9 (patch) | |
tree | f1df38521b088aafced89484c31213c58ec0747b /pkgs | |
parent | 040d6eb51ac6357517558e343b7db8b9b5bf8d98 (diff) |
powerdns-admin: fix and add module
- Add the migrations directory to the package - Add postgres support to the package - Add a service for powerdns-admin Co-authored-by: Zhaofeng Li <hello@zhaofeng.li>
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/networking/powerdns-admin/default.nix | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/applications/networking/powerdns-admin/default.nix b/pkgs/applications/networking/powerdns-admin/default.nix index 9dba30e3d8843..8cc2ec83cd509 100644 --- a/pkgs/applications/networking/powerdns-admin/default.nix +++ b/pkgs/applications/networking/powerdns-admin/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, mkYarnPackage, writeText, python3 }: +{ lib, stdenv, fetchFromGitHub, mkYarnPackage, nixosTests, writeText, python3 }: let version = "0.2.3"; @@ -23,8 +23,8 @@ let pythonDeps = with python.pkgs; [ flask flask_assets flask_login flask_sqlalchemy flask_migrate flask-seasurf flask_mail flask-sslify - mysqlclient sqlalchemy - configobj bcrypt requests ldap pyotp qrcode dnspython + mysqlclient psycopg2 sqlalchemy + cffi configobj cryptography bcrypt requests ldap pyotp qrcode dnspython gunicorn python3-saml pyopenssl pytz cssmin jsmin authlib bravado-core lima pytimeparse pyyaml ]; @@ -91,6 +91,7 @@ in stdenv.mkDerivation rec { postPatch = '' rm -r powerdnsadmin/static powerdnsadmin/assets.py + sed -i "s/id:/'id':/" migrations/versions/787bdba9e147_init_db.py ''; installPhase = '' @@ -100,7 +101,7 @@ in stdenv.mkDerivation rec { wrapPythonPrograms mkdir -p $out/share $out/bin - cp -r powerdnsadmin $out/share/powerdnsadmin + cp -r migrations powerdnsadmin $out/share/ ln -s ${assets} $out/share/powerdnsadmin/static ln -s ${assetsPy} $out/share/powerdnsadmin/assets.py @@ -114,6 +115,12 @@ in stdenv.mkDerivation rec { runHook postInstall ''; + passthru = { + # PYTHONPATH of all dependencies used by the package + pythonPath = python3.pkgs.makePythonPath pythonDeps; + tests = nixosTests.powerdns-admin; + }; + meta = with lib; { description = "A PowerDNS web interface with advanced features"; homepage = "https://github.com/ngoduykhanh/PowerDNS-Admin"; |