about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-04-10 21:54:48 +0200
committerGitHub <noreply@github.com>2024-04-10 21:54:48 +0200
commitca729afa8c24d9cfbecf752651faa76dc5824cfa (patch)
treec146adc6cfb217db51356dc6e29e67fd3bd31808 /pkgs/tools
parentdbc967d14d354154bc556a4348971c59df5dc56c (diff)
parent8d029ac4419377bdc9bf6468a5a2ba8357499b9d (diff)
Merge pull request #302812 from gador/pgadmin-darwin
pgadmin4: add darwin build
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/admin/pgadmin/default.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/tools/admin/pgadmin/default.nix b/pkgs/tools/admin/pgadmin/default.nix
index 2e5ee6d574f29..35f633145a4d5 100644
--- a/pkgs/tools/admin/pgadmin/default.nix
+++ b/pkgs/tools/admin/pgadmin/default.nix
@@ -9,6 +9,7 @@
 , yarn
 , prefetch-yarn-deps
 , nodejs
+, stdenv
 , server-mode ? true
 }:
 
@@ -44,6 +45,17 @@ let
     hash = yarnHash;
   };
 
+  # don't bother to test kerberos authentication
+  # skip tests on macOS which fail due to an error in keyring, see https://github.com/NixOS/nixpkgs/issues/281214
+  skippedTests = builtins.concatStringsSep "," (
+    [ "browser.tests.test_kerberos_with_mocking" ]
+    ++ lib.optionals stdenv.isDarwin [
+      "browser.server_groups.servers.tests.test_all_server_get"
+      "browser.server_groups.servers.tests.test_check_connect"
+      "browser.server_groups.servers.tests.test_check_ssh_mock_connect"
+      "browser.server_groups.servers.tests.test_is_password_saved"
+    ]
+  );
 in
 
 pythonPackages.buildPythonApplication rec {
@@ -228,9 +240,7 @@ pythonPackages.buildPythonApplication rec {
     substituteInPlace regression/runtests.py --replace-fail "builtins.SERVER_MODE = None" "builtins.SERVER_MODE = False"
 
     ## Browser test ##
-
-    # don't bother to test kerberos authentication
-    python regression/runtests.py --pkg browser --exclude browser.tests.test_kerberos_with_mocking
+    python regression/runtests.py --pkg browser --exclude ${skippedTests}
 
     ## Reverse engineered SQL test ##
 
@@ -250,7 +260,7 @@ pythonPackages.buildPythonApplication rec {
       This should NOT be used in combination with the `pgadmin4-desktopmode` package as they will interfere.
       '' else ''
       This version is build with SERVER_MODE set to False. It will require access to `~/.pgadmin/`. This version is suitable
-      for single-user deployment or where access to `/var/lib/pgadmin` cannot be granted or the NixOS module cannot be used.
+      for single-user deployment or where access to `/var/lib/pgadmin` cannot be granted or the NixOS module cannot be used (e.g. on MacOS).
       This should NOT be used in combination with the NixOS module `pgadmin` as they will interfere.
       ''}
     '';
@@ -259,5 +269,6 @@ pythonPackages.buildPythonApplication rec {
     changelog = "https://www.pgadmin.org/docs/pgadmin4/latest/release_notes_${lib.versions.major version}_${lib.versions.minor version}.html";
     maintainers = with maintainers; [ gador ];
     mainProgram = "pgadmin4";
+    platforms = platforms.unix;
   };
 }