Unverified Commit 3b50b853 authored by Janne Heß's avatar Janne Heß
Browse files

openbao.ui: Cleanup package

- Print yarn error logs
- Run build hooks
- Add meta
parent 4457aea4
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -27,12 +27,27 @@ stdenvNoCC.mkDerivation (finalAttrs: {

  env.YARN_ENABLE_SCRIPTS = 0;

  preConfigure = ''
    printYarnErrors() {
      cat /build/*.log
    }
    failureHooks+=(printYarnErrors)
  '';

  postConfigure = ''
    substituteInPlace .ember-cli \
      --replace-fail "../http/web_ui" "$out"
  '';

  buildPhase = "yarn run ember build --environment=production";
  buildPhase = ''
    runHook preBuild
    yarn run ember build --environment=production
    runHook postBuild
  '';

  dontInstall = true;

  meta = (builtins.removeAttrs openbao.meta [ "mainProgram" ]) // {
    description = openbao.meta.description + " - web UI";
  };
})