From c0b69f571968269f35561cc09c17c710d938389d Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 28 Sep 2022 16:29:32 -0400 Subject: [PATCH] inlyne: init at 0.2.0 --- pkgs/applications/misc/inlyne/default.nix | 76 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 ++ 2 files changed, 82 insertions(+) create mode 100644 pkgs/applications/misc/inlyne/default.nix diff --git a/pkgs/applications/misc/inlyne/default.nix b/pkgs/applications/misc/inlyne/default.nix new file mode 100644 index 000000000000..6d78dd559c26 --- /dev/null +++ b/pkgs/applications/misc/inlyne/default.nix @@ -0,0 +1,76 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, stdenv +, pkg-config +, fontconfig +, libXcursor +, libXi +, libXrandr +, libxcb +, libGL +, libX11 +, openssl +, AppKit +, ApplicationServices +, CoreFoundation +, CoreGraphics +, CoreServices +, CoreText +, CoreVideo +, Foundation +, Metal +, QuartzCore +, Security +, libobjc +}: + +rustPlatform.buildRustPackage rec { + pname = "inlyne"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "trimental"; + repo = pname; + rev = "v${version}"; + sha256 = "1y8nxz20agmrdcl25wry8lnpg86zbkkkkiscljwd7g7a831hlb9z"; + }; + + cargoSha256 = "sha256-NXVwydEn4hX/4NorDx6eE+sWQXj1jwZgzpDE3wg8OkU="; + + nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config ]; + + buildInputs = lib.optionals stdenv.isLinux [ + fontconfig + libXcursor + libXi + libXrandr + libxcb + 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 \ + --add-rpath ${lib.makeLibraryPath [ libGL libX11 ]} + ''; + + meta = with lib; { + description = "A GPU powered browserless markdown viewer"; + homepage = "https://github.com/trimental/inlyne"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c3854037f194..495daa2305b3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29071,6 +29071,12 @@ with pkgs; inkscape-extensions = recurseIntoAttrs (callPackages ../applications/graphics/inkscape/extensions.nix {}); + inlyne = callPackage ../applications/misc/inlyne { + inherit (xorg) libX11 libXcursor libXi libXrandr libxcb; + inherit (darwin) libobjc; + inherit (darwin.apple_sdk.frameworks) AppKit ApplicationServices CoreFoundation CoreGraphics CoreServices CoreText CoreVideo Foundation Metal QuartzCore Security; + }; + inspectrum = callPackage ../applications/radio/inspectrum { }; inputplug = callPackage ../tools/X11/inputplug { };