pjsip: add version and pkg-config tests

This commit is contained in:
Bob van der Linden
2023-04-03 15:18:52 +02:00
parent 532911e9ae
commit c32dd072f0

View File

@@ -1,4 +1,5 @@
{ lib
, testers
, stdenv
, fetchFromGitHub
, fetchpatch
@@ -102,6 +103,16 @@ stdenv.mkDerivation (finalAttrs: {
# We need the libgcc_s.so.1 loadable (for pthread_cancel to work)
dontPatchELF = true;
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "pjsua --version";
};
passthru.tests.pkg-config = testers.hasPkgConfigModule {
package = finalAttrs.finalPackage;
moduleName = "libpjproject";
};
passthru.tests.python-pjsua2 = runCommand "python-pjsua2" { } ''
${(python3.withPackages (pkgs: [ pkgs.pjsua2 ])).interpreter} -c "import pjsua2" > $out
'';