nixpkgs/pkgs/applications/misc/inlyne/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.8 KiB
Nix
Raw Permalink Normal View History

2022-09-28 20:29:32 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
2022-09-28 20:29:32 +00:00
, stdenv
, pkg-config
, fontconfig
, xorg
2024-02-18 23:48:52 +00:00
, libxkbcommon
, wayland
2022-09-28 20:29:32 +00:00
, libGL
, openssl
, darwin
2022-09-28 20:29:32 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "inlyne";
2024-08-30 09:40:28 +00:00
version = "0.4.3";
2022-09-28 20:29:32 +00:00
src = fetchFromGitHub {
2024-08-30 09:40:28 +00:00
owner = "Inlyne-Project";
2022-09-28 20:29:32 +00:00
repo = pname;
rev = "v${version}";
2024-08-30 09:40:28 +00:00
hash = "sha256-j4DEau7LZxIoVIIYwCUgqmkSgdRxWzF5/vOS0lvjgUk=";
2022-09-28 20:29:32 +00:00
};
2024-08-30 09:40:28 +00:00
cargoHash = "sha256-fMovzaP+R0CUwJy1HKATH2tPrIPwzGtubF1WHUoQDRY=";
2022-09-28 20:29:32 +00:00
nativeBuildInputs = [
installShellFiles
] ++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
];
2022-09-28 20:29:32 +00:00
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
fontconfig
xorg.libXcursor
xorg.libXi
xorg.libXrandr
xorg.libxcb
2024-02-18 23:48:52 +00:00
wayland
libxkbcommon
2022-09-28 20:29:32 +00:00
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk_11_0.frameworks.AppKit
2022-09-28 20:29:32 +00:00
];
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
# time out on darwin
"--skip=interpreter::tests::centered_image_with_size_align_and_link"
"--skip=watcher::tests::the_gauntlet"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd inlyne \
--bash completions/inlyne.bash \
--fish completions/inlyne.fish \
--zsh completions/_inlyne
'';
2022-09-28 20:29:32 +00:00
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf $out/bin/inlyne \
--add-rpath ${lib.makeLibraryPath [ libGL xorg.libX11 ]}
2022-09-28 20:29:32 +00:00
'';
meta = with lib; {
description = "GPU powered browserless markdown viewer";
2024-08-30 09:40:28 +00:00
homepage = "https://github.com/Inlyne-Project/inlyne";
changelog = "https://github.com/Inlyne-Project/inlyne/releases/tag/${src.rev}";
2022-09-28 20:29:32 +00:00
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
2024-02-11 02:19:15 +00:00
mainProgram = "inlyne";
2022-09-28 20:29:32 +00:00
};
}