Loading pkgs/applications/video/mpv/0001-fix-darwin-build.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line diff --git a/osdep/mac/input_helper.swift b/osdep/mac/input_helper.swift index 0acec6bd40..0ec5837864 100644 --- a/osdep/mac/input_helper.swift +++ b/osdep/mac/input_helper.swift @@ -18,6 +18,14 @@ import Cocoa import Carbon.HIToolbox +extension NSCondition { + fileprivate func withLock<T>(_ body: () throws -> T) rethrows -> T { + self.lock() + defer { self.unlock() } + return try body() + } +} + class InputHelper: NSObject { var option: OptionHelper? var lock = NSCondition() pkgs/applications/video/mpv/default.nix +7 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,11 @@ stdenv'.mkDerivation (finalAttrs: { hash = "sha256-BOGh+QBTO7hrHohh+RqjSF8eHQH8jVBPjG/k4eyFaaM="; }; patches = [ # Fix build with Darwin SDK 11 ./0001-fix-darwin-build.patch ]; postPatch = lib.concatStringsSep "\n" [ # Don't reference compile time dependencies or create a build outputs cycle # between out and dev Loading Loading @@ -308,6 +313,8 @@ stdenv'.mkDerivation (finalAttrs: { pushd ../TOOLS cp mpv_identify.sh umpv $out/bin/ popd '' + lib.optionalString stdenv.hostPlatform.isLinux '' pushd $out/share/applications sed -e '/Icon=/ ! s|mpv|umpv|g; s|^Exec=.*|Exec=umpv %U|' \ Loading pkgs/servers/gonic/default.nix +6 −3 Original line number Diff line number Diff line Loading @@ -30,18 +30,18 @@ buildGoModule rec { postPatch = lib.optionalString transcodingSupport '' substituteInPlace \ transcode/transcode.go \ --replace \ --replace-fail \ '`ffmpeg' \ '`${lib.getBin ffmpeg}/bin/ffmpeg' '' + '' substituteInPlace \ jukebox/jukebox.go \ --replace \ --replace-fail \ '"mpv"' \ '"${lib.getBin mpv}/bin/mpv"' '' + '' substituteInPlace server/ctrlsubsonic/testdata/test* \ --replace \ --replace-quiet \ '"audio/flac"' \ '"audio/x-flac"' ''; Loading @@ -50,6 +50,9 @@ buildGoModule rec { tests.gonic = nixosTests.gonic; }; # tests require it __darwinAllowLocalNetworking = true; meta = { homepage = "https://github.com/sentriz/gonic"; description = "Music streaming server / subsonic server API implementation"; Loading Loading
pkgs/applications/video/mpv/0001-fix-darwin-build.patch 0 → 100644 +19 −0 Original line number Diff line number Diff line diff --git a/osdep/mac/input_helper.swift b/osdep/mac/input_helper.swift index 0acec6bd40..0ec5837864 100644 --- a/osdep/mac/input_helper.swift +++ b/osdep/mac/input_helper.swift @@ -18,6 +18,14 @@ import Cocoa import Carbon.HIToolbox +extension NSCondition { + fileprivate func withLock<T>(_ body: () throws -> T) rethrows -> T { + self.lock() + defer { self.unlock() } + return try body() + } +} + class InputHelper: NSObject { var option: OptionHelper? var lock = NSCondition()
pkgs/applications/video/mpv/default.nix +7 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,11 @@ stdenv'.mkDerivation (finalAttrs: { hash = "sha256-BOGh+QBTO7hrHohh+RqjSF8eHQH8jVBPjG/k4eyFaaM="; }; patches = [ # Fix build with Darwin SDK 11 ./0001-fix-darwin-build.patch ]; postPatch = lib.concatStringsSep "\n" [ # Don't reference compile time dependencies or create a build outputs cycle # between out and dev Loading Loading @@ -308,6 +313,8 @@ stdenv'.mkDerivation (finalAttrs: { pushd ../TOOLS cp mpv_identify.sh umpv $out/bin/ popd '' + lib.optionalString stdenv.hostPlatform.isLinux '' pushd $out/share/applications sed -e '/Icon=/ ! s|mpv|umpv|g; s|^Exec=.*|Exec=umpv %U|' \ Loading
pkgs/servers/gonic/default.nix +6 −3 Original line number Diff line number Diff line Loading @@ -30,18 +30,18 @@ buildGoModule rec { postPatch = lib.optionalString transcodingSupport '' substituteInPlace \ transcode/transcode.go \ --replace \ --replace-fail \ '`ffmpeg' \ '`${lib.getBin ffmpeg}/bin/ffmpeg' '' + '' substituteInPlace \ jukebox/jukebox.go \ --replace \ --replace-fail \ '"mpv"' \ '"${lib.getBin mpv}/bin/mpv"' '' + '' substituteInPlace server/ctrlsubsonic/testdata/test* \ --replace \ --replace-quiet \ '"audio/flac"' \ '"audio/x-flac"' ''; Loading @@ -50,6 +50,9 @@ buildGoModule rec { tests.gonic = nixosTests.gonic; }; # tests require it __darwinAllowLocalNetworking = true; meta = { homepage = "https://github.com/sentriz/gonic"; description = "Music streaming server / subsonic server API implementation"; Loading