From c32dd072f0f6fc8e00b3d926fbe4a3f32ba529ab Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Mon, 3 Apr 2023 15:18:52 +0200 Subject: pjsip: add version and pkg-config tests --- pkgs/applications/networking/pjsip/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/applications/networking/pjsip/default.nix b/pkgs/applications/networking/pjsip/default.nix index eeeb68df87b42..338d4cb2f08a6 100644 --- a/pkgs/applications/networking/pjsip/default.nix +++ b/pkgs/applications/networking/pjsip/default.nix @@ -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 ''; -- cgit 1.4.1