tplay: fix runtime ffprobe dependency

This commit is contained in:
Lin Xianyi 2024-07-11 09:49:51 +08:00
parent 212defe037
commit b15945b43c

View File

@ -1,13 +1,15 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, clang
, ffmpeg
, openssl
, alsa-lib
, libclang
, opencv
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
clang,
ffmpeg,
openssl,
alsa-lib,
libclang,
opencv,
makeWrapper,
}:
rustPlatform.buildRustPackage rec {
pname = "tplay";
@ -16,13 +18,13 @@ rustPlatform.buildRustPackage rec {
src = fetchFromGitHub {
owner = "maxcurzi";
repo = "tplay";
rev = "v${version}";
rev = "v${version}";
hash = "sha256-/3ui0VOxf+kYfb0JQXPVbjAyXPph2LOg2xB0DGmAbwc=";
};
cargoHash = "sha256-zRkIEH37pvxHUbnfg25GW1Z7od9XMkRmP2Qvs64uUjg=";
checkFlags = [
# requires network access
# requires network access
"--skip=pipeline::image_pipeline::tests::test_process"
"--skip=pipeline::image_pipeline::tests::test_to_ascii"
"--skip=pipeline::image_pipeline::tests::test_to_ascii_ext"
@ -34,6 +36,7 @@ rustPlatform.buildRustPackage rec {
pkg-config
clang
ffmpeg
makeWrapper
];
buildInputs = [
@ -44,11 +47,19 @@ rustPlatform.buildRustPackage rec {
opencv
];
postFixup = ''
wrapProgram $out/bin/tplay \
--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}"
'';
meta = {
description = "Terminal Media Player";
homepage = "https://github.com/maxcurzi/tplay";
platforms = lib.platforms.linux;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ demine colemickens ];
maintainers = with lib.maintainers; [
demine
colemickens
];
};
}