diff --git a/pkgs/by-name/so/sofia_sip/package.nix b/pkgs/by-name/so/sofia_sip/package.nix index 3b9229c8af57..98b4dc63220a 100644 --- a/pkgs/by-name/so/sofia_sip/package.nix +++ b/pkgs/by-name/so/sofia_sip/package.nix @@ -3,6 +3,8 @@ stdenv, fetchFromGitHub, fetchpatch2, + gitUpdater, + testers, autoconf, automake, check, @@ -14,23 +16,23 @@ zlib, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sofia-sip"; version = "1.13.17"; src = fetchFromGitHub { owner = "freeswitch"; repo = "sofia-sip"; - rev = "v${version}"; - sha256 = "sha256-7QmK2UxEO5lC0KBDWB3bwKTy0Nc7WrdTLjoQYzezoaY="; + rev = "v${finalAttrs.version}"; + hash = "sha256-7QmK2UxEO5lC0KBDWB3bwKTy0Nc7WrdTLjoQYzezoaY="; }; patches = [ # Fix build with gcc 14 from https://github.com/freeswitch/sofia-sip/pull/249 (fetchpatch2 { name = "sofia-sip-fix-incompatible-pointer-type.patch"; - url = "https://github.com/freeswitch/sofia-sip/commit/46b02f0655af0a9594e805f09a8ee99278f84777.diff"; - hash = "sha256-4uZVtKnXG+BPW8byjd7tu4uEZo9SYq9EzTEvMwG0Bak="; + url = "https://github.com/freeswitch/sofia-sip/commit/46b02f0655af0a9594e805f09a8ee99278f84777.patch?full_index=1"; + hash = "sha256-bZzjg7GBxR2wSlPH81krZRCK43OirGLWH/lrLRZ0L0k="; }) # Disable some failing tests @@ -85,11 +87,25 @@ stdenv.mkDerivation rec { doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; - meta = with lib; { + passthru = { + tests.pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + versionCheck = true; + }; + updateScript = gitUpdater { + rev-prefix = "v"; + }; + }; + + meta = { description = "Open-source SIP User-Agent library, compliant with the IETF RFC3261 specification"; homepage = "https://github.com/freeswitch/sofia-sip"; - platforms = platforms.unix; - license = licenses.lgpl2; + platforms = lib.platforms.unix; + license = lib.licenses.lgpl2Plus; teams = [ lib.teams.ngi ]; + pkgConfigModules = [ + "sofia-sip-ua" + "sofia-sip-ua-glib" + ]; }; -} +})