Commit 7ceac112 authored by Gaetan Lepage's avatar Gaetan Lepage Committed by Gaétan Lepage
Browse files
parent ed650ac4
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -5,39 +5,45 @@
  libsixel,
  stdenv,
  nix-update-script,
  testers,
  presenterm,
  versionCheckHook,
}:

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

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

  buildInputs = [
    libsixel
  ];

  cargoHash = "sha256-2aHJnGSuP0TEBMxF1zljbEyk1g6ECTpnByyH8jaj78s=";
  cargoHash = "sha256-IC72l1xbH/AdCHdcgY8ODv6+YZUmT5NYVisP9oIMpGA=";

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

  checkFlags = [
    # failed to load .tmpEeeeaQ: No such file or directory (os error 2)
    "--skip=external_snippet"
  ];

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

  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  versionCheckProgramArg = [ "--version" ];
  doInstallCheck = true;

  meta = {
    description = "Terminal based slideshow tool";
    changelog = "https://github.com/mfontanini/presenterm/releases/tag/v${version}";