depot/third_party/nixpkgs/pkgs/by-name/tp/tplay/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

65 lines
1.3 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
clang,
ffmpeg,
openssl,
alsa-lib,
libclang,
opencv,
makeWrapper,
}:
rustPlatform.buildRustPackage rec {
pname = "tplay";
version = "0.5.0";
src = fetchFromGitHub {
owner = "maxcurzi";
repo = "tplay";
rev = "v${version}";
hash = "sha256-/3ui0VOxf+kYfb0JQXPVbjAyXPph2LOg2xB0DGmAbwc=";
};
cargoHash = "sha256-zRkIEH37pvxHUbnfg25GW1Z7od9XMkRmP2Qvs64uUjg=";
checkFlags = [
# 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"
"--skip=pipeline::runner::tests::test_time_to_send_next_frame"
];
nativeBuildInputs = [
rustPlatform.bindgenHook
pkg-config
clang
ffmpeg
makeWrapper
];
buildInputs = [
openssl.dev
alsa-lib.dev
libclang.lib
ffmpeg.dev
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
];
};
}