about summary refs log tree commit diff
path: root/pkgs/by-name/pr/presenterm/package.nix
blob: d2915f4f8a1355adcffb4c93e0971c99405d625c (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
, stdenv
, nix-update-script
, testers
, presenterm
}:

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

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

  buildInputs = [
    libsixel
  ];

  cargoHash = "sha256-2aHJnGSuP0TEBMxF1zljbEyk1g6ECTpnByyH8jaj78s=";

  # Crashes at runtime on darwin with:
  # Library not loaded: .../out/lib/libsixel.1.dylib
  buildFeatures = lib.optionals (!stdenv.isDarwin) [ "sixel" ];

  passthru = {
    updateScript = nix-update-script { };
    tests.version = testers.testVersion {
      package = presenterm;
      command = "presenterm --version";
    };
  };

  meta = {
    description = "Terminal based slideshow tool";
    changelog = "https://github.com/mfontanini/presenterm/releases/tag/v${version}";
    homepage = "https://github.com/mfontanini/presenterm";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ mikaelfangel ];
    mainProgram = "presenterm";
  };
}