eintopf.frontend: cleanup and modernize

This commit is contained in:
Jonas Heinrich 2024-11-06 07:35:54 +01:00
parent 1ca183731c
commit b6176b5fd2

View File

@ -1,12 +1,12 @@
{
stdenv,
fetchYarnDeps,
fixup-yarn-lock,
yarn,
src,
version,
nodejs,
eintopf,
yarnConfigHook,
yarnBuildHook,
}:
stdenv.mkDerivation (finalAttrs: {
@ -21,31 +21,12 @@ stdenv.mkDerivation (finalAttrs: {
};
nativeBuildInputs = [
fixup-yarn-lock
yarnConfigHook
yarnBuildHook
# Needed for executing package.json scripts
nodejs
yarn
];
configurePhase = ''
runHook preConfigure
export HOME=$(mktemp -d)
yarn config --offline set yarn-offline-mirror $offlineCache
fixup-yarn-lock yarn.lock
yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
patchShebangs node_modules
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
yarn --offline build
runHook postBuild
'';
installPhase = ''
runHook preInstall