about summary refs log tree commit diff
path: root/pkgs/by-name/pr/presenterm/package.nix
blob: 37ba6f817d30a98452a66f17c7dbbcc0c4958fb9 (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
{ lib
, fetchFromGitHub
, rustPlatform
, libsixel
, testers
, presenterm
, stdenv
}:

rustPlatform.buildRustPackage rec {
  pname = "presenterm";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "mfontanini";
    repo = "presenterm";
    rev = "refs/tags/v${version}";
    hash = "sha256-VAcK02dbtuTGn+lPu1vb/wAkroHuHqsU2KYHBiP2Org=";
  };

  buildInputs = [
    libsixel
  ];

  cargoHash = "sha256-bufFiyqRsn4eG57bKn42p5cyX+Z7oiz/USZvg9YOvHA=";

  buildFeatures = [ "sixel" ];

  # Skip test that currently doesn't work
  checkFlags = [ "--skip=execute::test::shell_code_execution" ];

  passthru.tests.version = testers.testVersion {
    package = presenterm;
    command = "presenterm --version";
  };

  meta = with lib; {
    description = "A terminal based slideshow tool";
    changelog = "https://github.com/mfontanini/presenterm/releases/tag/v${version}";
    homepage = "https://github.com/mfontanini/presenterm";
    license = licenses.bsd2;
    maintainers = with maintainers; [ mikaelfangel ];
    mainProgram = "presenterm";
    # Crashes at runtime on darwin with:
    # Library not loaded: .../out/lib/libsixel.1.dylib
    broken = stdenv.isDarwin;
  };
}