2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
|
|
|
, fontconfig
|
2022-10-21 18:38:19 +00:00
|
|
|
, xorg
|
2022-09-30 11:47:45 +00:00
|
|
|
, libGL
|
|
|
|
, openssl
|
|
|
|
, AppKit
|
|
|
|
, ApplicationServices
|
|
|
|
, CoreFoundation
|
|
|
|
, CoreGraphics
|
|
|
|
, CoreServices
|
|
|
|
, CoreText
|
|
|
|
, CoreVideo
|
|
|
|
, Foundation
|
|
|
|
, Metal
|
|
|
|
, QuartzCore
|
|
|
|
, Security
|
|
|
|
, libobjc
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "inlyne";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "0.2.1";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trimental";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-jFocERr2cW7zdLiYfAay5Dh1issKAHp6vRWYWR1Axcg=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
cargoSha256 = "sha256-mH8tu8koprmHo6JJ9AwYMexy2SFR2yukZmFT060cuZ4=";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
|
|
|
fontconfig
|
2022-10-21 18:38:19 +00:00
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libxcb
|
2022-09-30 11:47:45 +00:00
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
AppKit
|
|
|
|
ApplicationServices
|
|
|
|
CoreFoundation
|
|
|
|
CoreGraphics
|
|
|
|
CoreServices
|
|
|
|
CoreText
|
|
|
|
CoreVideo
|
|
|
|
Foundation
|
|
|
|
Metal
|
|
|
|
QuartzCore
|
|
|
|
Security
|
|
|
|
libobjc
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
|
|
|
patchelf $out/bin/inlyne \
|
2022-10-21 18:38:19 +00:00
|
|
|
--add-rpath ${lib.makeLibraryPath [ libGL xorg.libX11 ]}
|
2022-09-30 11:47:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A GPU powered browserless markdown viewer";
|
|
|
|
homepage = "https://github.com/trimental/inlyne";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|