38 lines
586 B
Nix
38 lines
586 B
Nix
{
|
|
src,
|
|
version,
|
|
stdenv,
|
|
yarnConfigHook,
|
|
yarnBuildHook,
|
|
nodejs-slim,
|
|
fetchYarnDeps,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "gotify-ui";
|
|
inherit version;
|
|
|
|
src = src + "/ui";
|
|
|
|
yarnOfflineCache = fetchYarnDeps {
|
|
yarnLock = "${finalAttrs.src}/yarn.lock";
|
|
hash = "sha256-PUO8HWTjtZfzWtLkDa827HoRx0LBxxO11My3mhito+I=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
yarnConfigHook
|
|
yarnBuildHook
|
|
nodejs-slim
|
|
];
|
|
|
|
env.NODE_OPTIONS = "--openssl-legacy-provider";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mv build $out
|
|
|
|
runHook postInstall
|
|
'';
|
|
})
|