Change:
nix-shell -p linphone fails with testsuitex509parse FAILED (401 / 426 tests (2 skipped)) cc Expected behavior linphone should build without error Metadata system: host os: multi-user?: sandbox: version: nixpkgs: Maintainer information:
This Nixpkgs is stable 19.09?
yes stable 19.09 nix-shell -p belle-sip is also broken looks like an issue with a library used by the two packages
the broken library is mbedtls-1.3.22
Hm. Does Linphone from or unstable compile and work fine?
Michael Raskin <: $ nix build -f channel:nixos-unstable linphone ok, it does build on unstable but running it crashes: $ result/bin/linphone could not connect to display Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstallin g the application may fix this problem. Available platform plugins are: wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite -glx, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. Aborted (core dumped)
Hm, I get this error when $DISPLAY is unset… But maybe you have some Qt things in your profile that conflict. Does this break in the same way from a fresh user that has access to the X display?
I have a vague memory that Qt apps crashed sometimes when the Qt version was upgraded, because some Qt cache files didn't invalidate automatically. The solution was to wipe those cached files. But I couldn't find more detailed information and I don't know if this could be related..
Ah, now I remembered, it was qmlcache. See this comment for a workaround: But I'm not at all sure that this has anything to do with the issue you're having. I'm just trying to guess possible causes.
Michael Raskin <: you are right, linphone starts gui under X so linphone on stable is broken and on unstable seems to work thanks for your help! i wonder what happened to the cli version?
Hi Jaakko, thanks for the ideas, it might be useful for some in the future. The problem I had was due to not running unstable linphone under X as Michael said.
Well, package does seem to carry some executables. Maybe one of these?
Michael Raskin <: you are right, how did you find it? neither nix search nor grep nixpkgs does find it $ nix search linphone nixpkgs.bctoolbox (bctoolbox-0.6.0) Utilities library for Linphone nixpkgs.linphone (linphone) Open Source video SIP softphone $ nix build -f channel:nixos-unstable liblinphone $ result/bin/linphonec 2020-04-11 12:49:28:549 belr-error-Could not load grammar vcard_grammar because the file could n ot be located. 2020-04-11 12:49:28:549 bctbx-fatal-Unable to load VCARD grammar. Aborted (core dumped) it crashes both with or without X
Michael Raskin <: Well, package does seem to carry some executables. Maybe one of these? By being a reviewer of the Linphone update — I have read the comment about the package split that has occured upstream $ nix build -f channel:nixos-unstable liblinphone 2020-04-11 12:49:28:549 belr-error-Could not load grammar vcard_grammar because the file could n ot be located. 2020-04-11 12:49:28:549 bctbx-fatal-Unable to load VCARD grammar. Aborted (core dumped) Hmmm. Annoying. Different components put grammars in different places, and some only come with the desktop application. Hmm. Patching might be needed.
Sounds similar issue that I had with linphone when packaging. I'll see if I can fix it similarly.
I opened a PR:

Discussion:
cp linphone.desktop $out/share/applications/ cp -r ../assets/icons $out/share/ mkdir -p $out/share/belr/grammars <del> ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/ </del> ln -s ${liblinphone}/share/belr/grammars/* $out/share/belr/grammars/ mkdir -p $out/share/linphone ln -s ${liblinphone}/share/linphone/* $out/share/linphone/

pkgconfig ]; <ins> # Some grammar files needed to be copied too from some dependencies. I suppose # if one define a dependency in such a way that its share directory is found, # then this copying would be unnecessary. Instead of actually copying these # files, create a symlink. postInstall = '' mkdir -p $out/share/belr/grammars ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/ ''; </ins> meta = with stdenv.lib; { homepage = "https://www.linphone.org/technical-corner/liblinphone"; description = "Library for SIP calls and instant messaging";