Merge pull request #207806 from linsui/jami

Closes https://github.com/NixOS/nixpkgs/pull/207667
This commit is contained in:
Sandro 2023-01-19 15:26:16 +01:00 committed by GitHub
commit 5ea1251972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 16 deletions

View file

@ -2,7 +2,6 @@
, src
, jami-meta
, lib
, fetchpatch
, stdenv
, pkg-config
, cmake
@ -31,14 +30,6 @@ stdenv.mkDerivation {
sourceRoot = "source/client-qt";
patches = [
(fetchpatch {
name = "fix-build-without-webengine.patch";
url = "https://git.jami.net/savoirfairelinux/jami-client-qt/-/commit/9b2dbb64eaa9256f800dfa69d897545f4b0affd2.patch";
hash = "sha256-lgDlSlXIjtdymBa7xSe1PabSK9DnSG5KnJggOLWyn+A=";
})
];
preConfigure = ''
echo 'const char VERSION_STRING[] = "${version}";' > src/app/version.h
'';

View file

@ -3,7 +3,8 @@
, callPackage
, fetchFromGitHub
, fetchzip
, ffmpeg
, fetchpatch
, ffmpeg_5
, pjsip
, opendht
, jack
@ -12,11 +13,11 @@
}:
let
version = "20221031.1308.130cc26";
version = "20221220.0956.79e1207";
src = fetchzip {
url = "https://dl.jami.net/release/tarballs/jami_${version}.tar.gz";
hash = "sha256-+xpSoSsG+G+w8+g0FhXx+6Phroj83ijW8xWvYO+kdqY=";
hash = "sha256-AQgz2GqueFG+yK42zJ9MzvP4BddGt0BFb+cIoA6Fif8=";
stripRoot = false;
postFetch = ''
@ -40,7 +41,7 @@ let
readLinesToList = with builtins; file: filter (s: isString s && stringLength s > 0) (split "\n" (readFile file));
in
rec {
ffmpeg-jami = (ffmpeg.override rec {
ffmpeg-jami = (ffmpeg_5.override rec {
version = "5.0.1";
branch = version;
sha256 = "sha256-KN8z1AChwcGyDQepkZeAmjuI73ZfXwfcH/Bn+sZMWdY=";
@ -50,7 +51,14 @@ rec {
patch-src = src + "/daemon/contrib/src/ffmpeg/";
in
{
patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/ffmpeg_patches));
patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/ffmpeg_patches)) ++
# SDL2 recently changed their versioning
[
(fetchpatch {
url = "https://git.videolan.org/?p=ffmpeg.git;a=patch;h=e5163b1d34381a3319214a902ef1df923dd2eeba";
hash = "sha256-nLhP2+34cj5EgpnUrePZp60nYAxmbhZAEDfay4pBVk0=";
})
];
configureFlags = old.configureFlags
++ (readLinesToList ./config/ffmpeg_args_common)
++ lib.optionals stdenv.isLinux (readLinesToList ./config/ffmpeg_args_linux)
@ -72,7 +80,20 @@ rec {
sha256 = "sha256-N7jn4qen+PgFiVkTFi2HSWhx2QPHwAYMtnrpE/ptDVc=";
};
patches = (map (x: patch-src + x) (readLinesToList ./config/pjsip_patches));
patches = (map (x: patch-src + x) (readLinesToList ./config/pjsip_patches)) ++ [
(fetchpatch {
name = "CVE-2022-23537.patch";
url = "https://github.com/pjsip/pjproject/commit/d8440f4d711a654b511f50f79c0445b26f9dd1e1.patch";
sha256 = "sha256-7ueQCHIiJ7MLaWtR4+GmBc/oKaP+jmEajVnEYqiwLRA=";
})
(fetchpatch {
name = "CVE-2022-23547.patch";
url = "https://github.com/pjsip/pjproject/commit/bc4812d31a67d5e2f973fbfaf950d6118226cf36.patch";
sha256 = "sha256-bpc8e8VAQpfyl5PX96G++6fzkFpw3Or1PJKNPKl7N5k=";
})
];
patchFlags = [ "-p1" "-l" ];
configureFlags = (readLinesToList ./config/pjsip_args_common)
++ lib.optionals stdenv.isLinux (readLinesToList ./config/pjsip_args_linux);
@ -88,6 +109,6 @@ rec {
};
jami-client = qt6Packages.callPackage ./client.nix {
inherit version src jami-meta ffmpeg-jami;
inherit version src ffmpeg-jami jami-meta;
};
}