Hi,
I’ve been trying for a while to get synochat packaged without any luck and pretty much gave up on it. Howver today I thought I’d try again with an different app EasyEda in this case which didn’t work out either:
final: prev: {
easyeda = let
lib = final.lib;
in
final.stdenv.mkDerivation (finalAttrs: rec {
name = "easyeda";
version = "6.5.46";
src = final.fetchzip {
url = "https://image.easyeda.com/files/easyeda-linux-x64-${finalAttrs.version}.zip";
sha256 = "sha256-0aMh8dD3z4A4IA1hlAwz9VeERlRWHe9HV54u7+OyKFM=";
stripRoot = false;
};
propagatedBuildInputs = with final; [electron];
buildInputs = with final; [
stdenv.cc.cc
stdenv.cc.cc.lib
alsa-lib
nss
libdrm
mesa
vulkan-loader
glib
nspr
atk
cups
dbus
gtk3
pango
cairo
gdk-pixbuf
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libxcb
expat
libxkbcommon
gnome.gvfs
harfbuzzFull
];
nativeBuildInputs = with final; [makeWrapper wrapGAppsHook patchelf autoPatchelfHook];
binaryName = "easyeda";
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/opt $out/share/applications/
cp -r $src/easyeda-linux-x64/ $out/opt/easyeda
chmod 755 $out/opt/easyeda/${binaryName}
patchelf --set-interpreter ${final.stdenv.cc.bintools.dynamicLinker} \
$out/opt/${binaryName}/${binaryName}
cp $out/opt/easyeda/EASYEDA.dkt $out/share/applications/EASYEDA.desktop
substituteInPlace $out/share/applications/EASYEDA.desktop \
--replace 'Exec=/opt/easyeda/easyeda %f' "Exec=easyeda %f"
runHook postInstall
'';
postFixup = ''
makeWrapper $out/opt/easyeda/easyeda $out/bin/easyeda \
"''${gappsWrapperArgs[@]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}:$out/opt/easyeda \
--prefix PATH : ${lib.makeBinPath finalAttrs.buildInputs}
'';
});
easyeda-fhs = final.buildFHSUserEnv {
name = "easyeda";
targetPkgs = pkgs: pkgs.easyeda.buildInputs ++ [pkgs.easyeda];
};
}
Both synochat and easyeda fail with the similar error message:
[3288378:0100/000000.527210:ERROR:zygote_linux.cc(611)] Zygote could not fork: process_type gpu-process numfds 3 child_pid -1
[3288378:0100/000000.527296:ERROR:zygote_linux.cc(643)] write: Broken pipe (32)
Has anybody here any idea on how to tackle this problem ? Maybe somebody with an deeper understanding about the inner workings of electron?