about summary refs log tree commit diff
path: root/pkgs/by-name/tp/tplay/package.nix
blob: 619192ddf50a93ed470ced871585f6ea5ecaf333 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, clang
, ffmpeg
, openssl
, alsa-lib
, libclang
, opencv
}:
rustPlatform.buildRustPackage rec {
  pname = "tplay";
  version = "0.4.5";

  src = fetchFromGitHub {
    owner = "maxcurzi";
    repo = "tplay";
    rev =  "v${version}";
    hash = "sha256-qt5I5rel88NWJZ6dYLCp063PfVmGTzkUUKgF3JkhLQk=";
  };

  cargoHash = "sha256-0kHh7Wb9Dp+t2G9/Kz/3K43bQdFCl+q2Vc3W32koc2I=";
  cargoPatches = [ ./cargo.diff ];
  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 = [ pkg-config clang ffmpeg ];
  buildInputs = [
    openssl.dev
    alsa-lib.dev
    libclang.lib
    ffmpeg.dev
    opencv
  ];

  env.LIBCLANG_PATH = "${libclang.lib}/lib";

  meta = {
    description = "Terminal Media Player";
    homepage = "https://github.com/maxcurzi/tplay";
    platforms = lib.platforms.linux;
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ demine ];
  };
}