depot/pkgs/by-name/pr/presenterm/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

55 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
libsixel,
stdenv,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "presenterm";
version = "0.9.0";
src = fetchFromGitHub {
owner = "mfontanini";
repo = "presenterm";
rev = "refs/tags/v${version}";
hash = "sha256-BFL0Y6v1v15WLSvA5i+l47bR9+1qDHPWSMMuEaLdhPY=";
};
buildInputs = [
libsixel
];
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 { };
};
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;
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";
};
}