From 6d91e0539d819885fb8f63aa21642ec59e9b86ba Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Tue, 19 Mar 2024 12:41:59 +1100 Subject: [PATCH] youtube-tui: dynamically link libsixel on darwin --- pkgs/applications/video/youtube-tui/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/video/youtube-tui/default.nix b/pkgs/applications/video/youtube-tui/default.nix index bfa1039d5d33..63e9f51304ed 100644 --- a/pkgs/applications/video/youtube-tui/default.nix +++ b/pkgs/applications/video/youtube-tui/default.nix @@ -6,6 +6,7 @@ , xorg , stdenv , python3 +, makeBinaryWrapper , libsixel , mpv , CoreFoundation @@ -19,7 +20,7 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "Siriusmart"; - repo = pname; + repo = "youtube-tui"; rev = "v${version}"; hash = "sha256-FOiK3yQcQuwdCEjBtRPW4iBd+8uNsvZ6l5tclHVzL+M="; }; @@ -34,6 +35,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config python3 + makeBinaryWrapper ]; buildInputs = [ @@ -47,6 +49,12 @@ rustPlatform.buildRustPackage rec { AppKit ]; + # sixel-sys is dynamically linked to libsixel + postInstall = lib.optionalString stdenv.isDarwin '' + wrapProgram $out/bin/youtube-tui \ + --prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [libsixel]}" + ''; + meta = with lib; { description = "An aesthetically pleasing YouTube TUI written in Rust"; homepage = "https://siriusmart.github.io/youtube-tui";