Packaging Zoiper - propriatary zoip app that is Electron based

At least I think it is Electron based…

I have been trying to get this to work for a while now without success.

My current attempt:

This requires source downloaded from here:

(assuming this link still works, otherwise download Free Linux version)

Building works, but then running fails:

$ nix build 'path:.'
$ ./result/bin/zoiper
APP Started! [ PID: 2533974 ]
APP Started! [ PID: 2533976 ]
APP Started! [ PID: 2533977 ]
zsh: trace trap (core dumped)  ./result/bin/zoiper
[0100/000000.670634:ERROR:zygote_linux.cc(607)] Zygote could not fork: process_type gpu-process numfds 3 child_pid -1
[0100/000000.670697:ERROR:zygote_linux.cc(639)] write: Broken pipe (32)

(using the path:. kludge means I don’t have to check the source file into git - would look at a better solution here if I could get this to work)

Have tried strace, but I don’t see anything obvious.

Also tried adding udev to the dependencies as per How to package old Electron apps? but that didn’t help.

That works! Thanks!

It was complaining loudly though about libGL, so I added that also, and that problem also fixed.

How did you diagnose this?

Then again licensing does not work. “Executable checksum mismatch (5)”.

I had the theory that it didn’t like the modifications wrapProgram makes, so I removed that. But no joy. Same error.

Hate this stupid licensing, might switch to an OSS alternative instead.

If I build this (hackish) derivation:

        build = stdenv.mkDerivation {
            pname = "zoiper5";
            version = "5.6.9";

            src = src;

            sourceRoot = ".";

            unpackPhase = ":";

            installPhase = ''
              mkdir -p "$out/opt"
              tar -C "$out/opt" -xvf ${src}
              mv "$out/opt/Zoiper5" "$out/bin"
            '';

            meta = with lib; {
              description = "Voip softphone";
              homepage = "https://www.zoiper.com/";
              # license = licenses.unfree;
              platforms = platforms.linux;
              architectures = [ "x86" ];
            };
          };

Then I get a binary that is different from the source:

zoiper [!?] on  main
at 10:42:01 ❯ diff Zoiper5/zoiper ./result/bin/zoiper
Binary files Zoiper5/zoiper and ./result/bin/zoiper differ

zoiper [!?] on  main
at 10:42:18 ❌1 ❯ strings Zoiper5/zoiper >! a

zoiper [!?] on  main
at 10:42:27 ❯ strings /nix/store/2g9kk4yz38cjpzihbcjpvv8yalh694mn-zoiper5-5.6.9/bin/zoiper  >! b

zoiper [!?] on  main took 1m51s
at 10:44:35 ❯ diff -u a b
--- a	2025-06-11 10:42:27.543213504 +1000
+++ b	2025-06-11 10:42:33.461373014 +1000
@@ -4745,7 +4745,8 @@
 GLIBC_2.4
 GLIBC_2.3.4
 GLIBC_2.7
-/zoiper:/zoiper/RunTest:$ORIGIN:
+$ORIGIN
+XXXXXXXXXXXXXXXXXXXXXXXX
 _ZGTtnam
 getentropy
 _ZGTtdlPv

Is something making changes in order to ensure reproducible builds maybe? How do I stop this?

Wow. Looks like I got it working now.

Pity I can’t do something better with downloading the tar file, but it looks like upstream really wants you to download this interactively via a web browser.