about summary refs log tree commit diff
path: root/pkgs/by-name/td/tdf/package.nix
blob: 5d5a39058cc9d53ba224eb8852323dafe625a4bc (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
52
53
54
55
{
  lib,
  fetchFromGitHub,
  rustPlatform,
  pkg-config,
  cairo,
  glib,
  poppler,
}:

rustPlatform.buildRustPackage {
  pname = "tdf";
  version = "0-unstable-2024-05-29";

  src = fetchFromGitHub {
    owner = "itsjunetime";
    repo = "tdf";
    fetchSubmodules = true;
    rev = "017596a8b0745a6da7c3c75a5f55073b82202a5c";
    hash = "sha256-H0xdDvWDSkvIy4vFWKiVFP03CogswIZMQ393BeEy2BQ=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "ratatui-0.26.3" = "sha256-lRQQJqt9UKZ2OzvrNzq/FqDvU6CgPPDAB2QDB7TR1V4=";
      "ratatui-image-1.0.0" = "sha256-0lrFmXPljKKNIbLNhQsuCv7HhJOJ234HSfUPj4XSeXY=";
      "vb64-0.1.2" = "sha256-VvObgaJhHNah3exVQInFa5mhHjzEg0MaFqQdnCE5Pp8=";
    };
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [
    cairo
    glib
    poppler
  ];

  strictDeps = true;

  # No tests are currently present
  doCheck = false;

  # requires nightly features (feature(portable_simd))
  RUSTC_BOOTSTRAP = true;

  meta = {
    description = "Tui-based PDF viewer";
    homepage = "https://github.com/itsjunetime/tdf";
    license = lib.licenses.mpl20;
    maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
    mainProgram = "tdf";
    platforms = lib.platforms.linux;
  };
}