pgadmin4: pass pythonEnv as variable

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
main
Florian Brandes 2 years ago
parent 0dd6926b29
commit 709cc7066b
No known key found for this signature in database
GPG Key ID: 074048E893713170
  1. 32
      nixos/tests/pgadmin4.nix
  2. 2
      pkgs/tools/admin/pgadmin/default.nix

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, lib, buildDeps ? [ ], ... }:
import ./make-test-python.nix ({ pkgs, lib, buildDeps ? [ ], pythonEnv ? [ ], ... }:
/*
This test suite replaces the typical pytestCheckHook function in python
@ -7,12 +7,13 @@ import ./make-test-python.nix ({ pkgs, lib, buildDeps ? [ ], ... }:
To not repeat all the python dependencies needed, this test is called directly
from the pgadmin4 derivation, which also passes the currently
used propagatedBuildInputs.
used propagatedBuildInputs and any python overrides.
Unfortunately, there doesn't seem to be an easy way to otherwise include
the needed packages here.
Also any python Overrides need to be duplicated here, too.
Due the the needed parameters a direct call to "nixosTests.pgadmin4" fails
and needs to be called as "pgadmin4.tests"
*/
@ -31,30 +32,7 @@ import ./make-test-python.nix ({ pkgs, lib, buildDeps ? [ ], ... }:
# needed because pgadmin 6.8 will fail, if those dependencies get updated
nixpkgs.overlays = [
(self: super: {
pythonPackages = super.python3.pkgs.overrideScope (final: prev: rec {
flask = prev.flask.overridePythonAttrs (oldAttrs: rec {
version = "2.0.3";
src = oldAttrs.src.override {
inherit version;
sha256 = "sha256-4RIMIoyi9VO0cN9KX6knq2YlhGdSYGmYGz6wqRkCaH0=";
};
disabledTests = (oldAttrs.disabledTests or [ ]) ++ [
"test_aborting"
];
});
flask-paranoid = prev.flask-paranoid.overridePythonAttrs (oldAttrs: rec {
# Nothing of interest changed from 0.2 to 0.3
doCheck = false;
});
werkzeug = prev.werkzeug.overridePythonAttrs (oldAttrs: rec {
version = "2.0.3";
src = oldAttrs.src.override {
inherit version;
sha256 = "sha256-uGP4/wV8UiFktgZ8niiwQRYbS+W6TQ2s7qpQoWOCLTw=";
};
});
});
pythonPackages = pythonEnv;
})
];

@ -188,7 +188,7 @@ pythonPackages.buildPythonApplication rec {
passthru.tests = {
standalone = nixosTests.pgadmin4-standalone;
# regression and function tests of the package itself
package = (import ../../../../nixos/tests/pgadmin4.nix ({ inherit pkgs; buildDeps = buildDeps; }));
package = (import ../../../../nixos/tests/pgadmin4.nix ({ inherit pkgs; buildDeps = buildDeps; pythonEnv = pythonPackages; }));
};
meta = with lib; {

Loading…
Cancel
Save