pgadmin4: fix for Yarn 4.14

This commit is contained in:
Dimitar Nestorov
2026-05-09 10:59:34 +03:00
committed by K900
parent 8a34c4ef05
commit a37d6ae45d
2 changed files with 36 additions and 3 deletions
+11 -3
View File
@@ -9,13 +9,14 @@
yarn-berry_4,
nodejs,
stdenv,
pkgsBuildHost,
server-mode ? true,
}:
let
pname = "pgadmin";
version = "9.14";
yarnHash = "sha256-j/5qoCrhC7xBPaS6NhZFFQtJ7ThL/wkFXoCtyreLHco=";
yarnHash = "sha256-mJa5L8N40JWogQ8/LllSdX/uJHMzKULCow9+e5gFe/A=";
src = fetchFromGitHub {
owner = "pgadmin-org";
@@ -24,6 +25,9 @@ let
hash = "sha256-NQe1ZN8jQEJE5qSpL5MjgLwWLGrGXCIHaCd8zLpsx3s=";
};
# Remove after https://github.com/pgadmin-org/pgadmin4/commit/79e490c5fa6031af7baa83f04f751bdc790dc408 is released
yarnPatch = ./yarn-4.14-support.patch;
# keep the scope, as it is used throughout the derivation and tests
# this also makes potential future overrides easier
pythonPackages = python3.pkgs.overrideScope (final: prev: { });
@@ -49,6 +53,7 @@ pythonPackages.buildPythonApplication rec {
inherit missingHashes;
src = src + "/web";
hash = yarnHash;
patches = [ yarnPatch ];
};
# from Dockerfile
@@ -61,6 +66,7 @@ pythonPackages.buildPythonApplication rec {
./expose-setup.py.patch
# check for permission of /etc/pgadmin/config_system and don't fail
./check-system-config-dir.patch
];
postPatch = ''
@@ -109,8 +115,10 @@ pythonPackages.buildPythonApplication rec {
echo Building the web frontend...
cd web
(
export LD=$CC # https://github.com/imagemin/optipng-bin/issues/108
yarnBerryConfigHook
PATH=$PATH:${lib.makeBinPath [ pkgsBuildHost.git ]}
git apply ${yarnPatch}
export LD=$CC # https://github.com/imagemin/optipng-bin/issues/108
yarnBerryConfigHook
)
yarn webpacker
cp -r * ../pip-build/pgadmin4
@@ -0,0 +1,25 @@
diff --git a/.yarnrc.yml b/.yarnrc.yml
--- a/.yarnrc.yml
+++ b/.yarnrc.yml
@@ -1,5 +1,10 @@
+approvedGitRepositories:
+ - "**"
+
checksumBehavior: update
+enableScripts: true
+
logFilters:
- code: YN0013
level: discard
diff --git a/yarn.lock b/yarn.lock
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,6 @@
# Manual changes might be lost - proceed with caution!
__metadata:
- version: 8
+ version: 9
cacheKey: 10c0