Merge pull request #297078 from emilytrau/youtube-tui-darwin

youtube-tui: dynamically link libsixel on darwin
This commit is contained in:
Emily Trau 2024-03-19 23:29:49 +11:00 committed by GitHub
commit 0f1ee5c27f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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";