Files
nixpkgs/pkgs/by-name/pr/presenterm/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

82 lines
1.7 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
makeBinaryWrapper,
lld,
libsixel,
versionCheckHook,
nix-update-script,
}:
let
inherit (stdenv.hostPlatform) isDarwin isx86_64;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "presenterm";
version = "0.15.1";
src = fetchFromGitHub {
owner = "mfontanini";
repo = "presenterm";
tag = "v${finalAttrs.version}";
hash = "sha256-tkIw7qo7lq3rSaBG0m6HzlXt8l3dQVFSBm8P3v7adVk=";
};
nativeBuildInputs =
lib.optionals isDarwin [
makeBinaryWrapper
]
++ lib.optionals (isDarwin && isx86_64) [
lld
];
buildInputs = [
libsixel
];
buildFeatures = [
"sixel"
];
cargoHash = "sha256-CLoN85A2fggTHs/AHmo43N+9Q4FGKwNmKObw+OMBFao=";
env = lib.optionalAttrs (isDarwin && isx86_64) {
NIX_CFLAGS_LINK = "-fuse-ld=lld";
};
checkFeatures = [
"sixel"
];
checkFlags = [
# failed to load .tmpEeeeaQ: No such file or directory (os error 2)
"--skip=external_snippet"
];
# sixel-sys is dynamically linked to libsixel
postInstall = lib.optionalString isDarwin ''
wrapProgram $out/bin/presenterm \
--prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [ libsixel ]}"
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Terminal based slideshow tool";
changelog = "https://github.com/mfontanini/presenterm/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/mfontanini/presenterm";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ mikaelfangel ];
mainProgram = "presenterm";
};
})