about summary refs log tree commit diff
path: root/pkgs/by-name/li/live555/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/li/live555/package.nix')
-rw-r--r--pkgs/by-name/li/live555/package.nix41
1 files changed, 25 insertions, 16 deletions
diff --git a/pkgs/by-name/li/live555/package.nix b/pkgs/by-name/li/live555/package.nix
index 5051944cab1ec..2c9f13520eb7f 100644
--- a/pkgs/by-name/li/live555/package.nix
+++ b/pkgs/by-name/li/live555/package.nix
@@ -1,15 +1,16 @@
-{ lib
-, darwin
-, fetchurl
-, fetchpatch
-, openssl
-, stdenv
-, vlc
+{
+  lib,
+  darwin,
+  fetchpatch,
+  fetchurl,
+  openssl,
+  stdenv,
+  vlc,
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "live555";
-  version = "2024.03.08";
+  version = "2024.04.19";
 
   src = fetchurl {
     urls = [
@@ -18,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: {
       "https://download.videolan.org/contrib/live555/live.${finalAttrs.version}.tar.gz"
       "mirror://sourceforge/slackbuildsdirectlinks/live.${finalAttrs.version}.tar.gz"
     ];
-    hash = "sha256-wWUC4EbxxfK+OxXiyNbNMGObVMZOqb+8jTG078pnDeU=";
+    hash = "sha256-5sLr/sZ3LB83CEJx5OUjarx/Dh/ESJ+YaXY0QCAN3MI=";
   };
 
   patches = [
@@ -53,18 +54,19 @@ stdenv.mkDerivation (finalAttrs: {
       config.linux
   ''
   # condition from icu/base.nix
-  + lib.optionalString (stdenv.hostPlatform.libc == "glibc"
-                        || stdenv.hostPlatform.libc == "musl") ''
+  + lib.optionalString (lib.elem stdenv.hostPlatform.libc [ "glibc" "musl" ]) ''
     substituteInPlace liveMedia/include/Locale.hh \
       --replace '<xlocale.h>' '<locale.h>'
   '';
 
   configurePhase = let
-    platform = if stdenv.isLinux
-               then "linux"
-               else if stdenv.isDarwin
-               then "macosx-catalina"
-               else throw "Unsupported platform: ${stdenv.hostPlatform.system}";
+    platform =
+      if stdenv.isLinux then
+        "linux"
+      else if stdenv.isDarwin then
+        "macosx-catalina"
+      else
+        throw "Unsupported platform: ${stdenv.hostPlatform.system}";
   in ''
     runHook preConfigure
 
@@ -75,8 +77,15 @@ stdenv.mkDerivation (finalAttrs: {
 
   makeFlags = [
     "PREFIX=${placeholder "out"}"
+    "C_COMPILER=$(CC)"
+    "CPLUSPLUS_COMPILER=$(CXX)"
+    "LIBRARY_LINK=$(AR) cr "
+    "LINK=$(CXX) -o "
   ];
 
+  # required for whitespaces in makeFlags
+  __structuredAttrs = true;
+
   enableParallelBuilding = true;
 
   passthru.tests = {