Commit 2e21f6c5 authored by Vikingnope's avatar Vikingnope
Browse files

vesktop: fix permission denied electron build

parent fb7944c1
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -88,10 +88,15 @@ stdenv.mkDerivation (finalAttrs: {
    export CSC_IDENTITY_AUTO_DISCOVERY=false
  '';

  # electron builds must be writable on darwin
  preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
  # electron builds must be writable
  preBuild =
    lib.optionalString stdenv.hostPlatform.isDarwin ''
      cp -r ${electron.dist}/Electron.app .
      chmod -R u+w Electron.app
    ''
    + lib.optionalString stdenv.hostPlatform.isLinux ''
      cp -r ${electron.dist} electron-dist
      chmod -R u+w electron-dist
    '';

  buildPhase = ''
@@ -101,7 +106,7 @@ stdenv.mkDerivation (finalAttrs: {
    pnpm exec electron-builder \
      --dir \
      -c.asarUnpack="**/*.node" \
      -c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else electron.dist} \
      -c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else "electron-dist"} \
      -c.electronVersion=${electron.version}

    runHook postBuild