From d3763eeb08d2ecb1115c8ff00bddf8c801bd929a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 9 Jan 2024 15:43:04 +0000 Subject: [PATCH 1/3] libhdhomerun: 20220303 -> 20231214 --- pkgs/development/libraries/libhdhomerun/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libhdhomerun/default.nix b/pkgs/development/libraries/libhdhomerun/default.nix index 96b8e3c02937..c6fb327d0d2a 100644 --- a/pkgs/development/libraries/libhdhomerun/default.nix +++ b/pkgs/development/libraries/libhdhomerun/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "libhdhomerun"; - version = "20220303"; + version = "20231214"; src = fetchurl { url = "https://download.silicondust.com/hdhomerun/libhdhomerun_${version}.tgz"; - sha256 = "sha256-HlT/78LUiTkRUB2jHmYrnQY+bBiv4stcZlMyUnelSpc="; + sha256 = "sha256-VSoQLoqiq8xBYJDewvb4DaWfl/kfV5aOnp17PcAF268="; }; postPatch = lib.optionalString stdenv.isDarwin '' From e636c0dad77e6a728f47ec0ac44fcd32c214b874 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 20 Jan 2024 06:08:21 +0100 Subject: [PATCH 2/3] libhdhomerun: refactor Co-authored-by: Nicholas Sielicki --- .../libraries/libhdhomerun/default.nix | 15 +++--- .../nixos-darwin-no-fat-dylib.patch | 52 +++++++++++++++++++ 2 files changed, 61 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch diff --git a/pkgs/development/libraries/libhdhomerun/default.nix b/pkgs/development/libraries/libhdhomerun/default.nix index c6fb327d0d2a..558e6d6fa894 100644 --- a/pkgs/development/libraries/libhdhomerun/default.nix +++ b/pkgs/development/libraries/libhdhomerun/default.nix @@ -10,30 +10,33 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.silicondust.com/hdhomerun/libhdhomerun_${version}.tgz"; - sha256 = "sha256-VSoQLoqiq8xBYJDewvb4DaWfl/kfV5aOnp17PcAF268="; + hash = "sha256-VSoQLoqiq8xBYJDewvb4DaWfl/kfV5aOnp17PcAF268="; }; - postPatch = lib.optionalString stdenv.isDarwin '' - substituteInPlace Makefile \ - --replace "-arch x86_64" "-arch ${stdenv.hostPlatform.darwinArch}" - ''; + patches = [ + ./nixos-darwin-no-fat-dylib.patch + ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; installPhase = '' + runHook preInstall + mkdir -p $out/{bin,lib,include/hdhomerun} install -Dm444 libhdhomerun${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib install -Dm555 hdhomerun_config $out/bin cp *.h $out/include/hdhomerun + + runHook postInstall ''; meta = with lib; { description = "Implements the libhdhomerun protocol for use with Silicondust HDHomeRun TV tuners"; homepage = "https://www.silicondust.com/support/linux"; license = licenses.lgpl21Only; + maintainers = with maintainers; [ sielicki titanous ]; platforms = platforms.unix; - maintainers = [ maintainers.titanous ]; }; } diff --git a/pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch b/pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch new file mode 100644 index 000000000000..99c389a19434 --- /dev/null +++ b/pkgs/development/libraries/libhdhomerun/nixos-darwin-no-fat-dylib.patch @@ -0,0 +1,52 @@ +From 6b9ed19d7874b88b7db5b740dac3dcd7dcda6c8c Mon Sep 17 00:00:00 2001 +From: Nicholas Sielicki +Date: Sat, 25 Nov 2023 13:54:39 -0600 +Subject: [PATCH] nixos-darwin-no-fat-dylib + +Signed-off-by: Nicholas Sielicki +--- + Makefile | 24 ++++-------------------- + 1 file changed, 4 insertions(+), 20 deletions(-) + +diff --git a/Makefile b/Makefile +index 1d8fb9f..35c7d15 100644 +--- a/Makefile ++++ b/Makefile +@@ -42,30 +42,14 @@ LIBSRCS += hdhomerun_video.c + + ifeq ($(OS),Darwin) + +-TARGET_X64 := -target x86_64-apple-macos10.11 +-TARGET_ARM64 := -target arm64-apple-macos11 +- + all : hdhomerun_config libhdhomerun.dylib + +-hdhomerun_config_x64 : hdhomerun_config.c $(LIBSRCS) +- $(CC) $(TARGET_X64) $(CFLAGS) $+ $(LDFLAGS) -o $@ +- $(STRIP) $@ +- +-hdhomerun_config_arm64 : hdhomerun_config.c $(LIBSRCS) +- $(CC) $(TARGET_ARM64) $(CFLAGS) $+ $(LDFLAGS) -o $@ ++hdhomerun_config: hdhomerun_config.c $(LIBSRCS) ++ $(CC) $(CFLAGS) $+ $(LDFLAGS) -o $@ + $(STRIP) $@ + +-hdhomerun_config : hdhomerun_config_x64 hdhomerun_config_arm64 +- lipo -create -output hdhomerun_config hdhomerun_config_x64 hdhomerun_config_arm64 +- +-libhdhomerun_x64.dylib : $(LIBSRCS) +- $(CC) $(TARGET_X64) $(CFLAGS) -DDLL_EXPORT -fPIC -dynamiclib $+ $(LDFLAGS) -o $@ +- +-libhdhomerun_arm64.dylib : $(LIBSRCS) +- $(CC) $(TARGET_ARM64) $(CFLAGS) -DDLL_EXPORT -fPIC -dynamiclib $+ $(LDFLAGS) -o $@ +- +-libhdhomerun.dylib : libhdhomerun_x64.dylib libhdhomerun_arm64.dylib +- lipo -create -output libhdhomerun.dylib libhdhomerun_x64.dylib libhdhomerun_arm64.dylib ++libhdhomerun.dylib : $(LIBSRCS) ++ $(CC) $(CFLAGS) -DDLL_EXPORT -fPIC -dynamiclib $+ $(LDFLAGS) -o $@ + + else + +-- +2.42.0 + From 98c69a922b472c67f79902537925c7859cf58727 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 20 Jan 2024 06:17:23 +0100 Subject: [PATCH 3/3] mythtv: enable parallel building --- pkgs/applications/video/mythtv/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/video/mythtv/default.nix b/pkgs/applications/video/mythtv/default.nix index 7ea9a532a725..0f355577a6a4 100644 --- a/pkgs/applications/video/mythtv/default.nix +++ b/pkgs/applications/video/mythtv/default.nix @@ -43,6 +43,8 @@ mkDerivation rec { configureFlags = [ "--dvb-path=${linuxHeaders}/include" ]; + enableParallelBuilding = true; + meta = with lib; { homepage = "https://www.mythtv.org/"; description = "Open Source DVR";