2020-07-02 11:53:41 +03:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) optional optionals;
|
|
|
|
inherit (xorg) libX11 libXrandr libXinerama libXcursor libXi libXext;
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics Foundation IOKit Kernel OpenGL;
|
|
|
|
harfbuzzWithCoreText = harfbuzz.override { withCoreText = stdenv.isDarwin; };
|
|
|
|
in
|
2021-08-17 18:43:49 +03:00
|
|
|
with python3Packages;
|
2020-07-02 11:53:41 +03:00
|
|
|
mkShell rec {
|
|
|
|
buildInputs = [
|
|
|
|
harfbuzzWithCoreText
|
|
|
|
ncurses
|
|
|
|
lcms2
|
2021-09-25 15:37:38 +03:00
|
|
|
librsync
|
2020-07-02 11:53:41 +03:00
|
|
|
] ++ optionals stdenv.isDarwin [
|
|
|
|
Cocoa
|
|
|
|
CoreGraphics
|
|
|
|
Foundation
|
|
|
|
IOKit
|
|
|
|
Kernel
|
|
|
|
OpenGL
|
|
|
|
libpng
|
|
|
|
python3
|
|
|
|
zlib
|
2021-12-28 17:35:16 +03:00
|
|
|
] ++ lib.optionals (stdenv.isDarwin && (builtins.hasAttr "UserNotifications" darwin.apple_sdk.frameworks)) [
|
|
|
|
darwin.apple_sdk.frameworks.UserNotifications
|
2020-07-02 11:53:41 +03:00
|
|
|
] ++ optionals stdenv.isLinux [
|
|
|
|
fontconfig libunistring libcanberra libX11
|
|
|
|
libXrandr libXinerama libXcursor libxkbcommon libXi libXext
|
|
|
|
wayland-protocols wayland dbus
|
|
|
|
] ++ checkInputs;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-08-17 18:43:49 +03:00
|
|
|
ncurses
|
|
|
|
pkg-config
|
|
|
|
sphinx
|
2021-08-17 18:55:40 +03:00
|
|
|
furo
|
|
|
|
sphinx-copybutton
|
|
|
|
sphinxext-opengraph
|
|
|
|
sphinx-inline-tabs
|
2020-07-02 11:53:41 +03:00
|
|
|
] ++ optionals stdenv.isDarwin [
|
|
|
|
imagemagick
|
|
|
|
libicns # For the png2icns tool.
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = optional stdenv.isLinux libGL;
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-08-17 18:43:49 +03:00
|
|
|
pillow
|
2020-07-02 11:53:41 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
# Causes build failure due to warning when using Clang
|
|
|
|
hardeningDisable = [ "strictoverflow" ];
|
|
|
|
|
|
|
|
shellHook = if stdenv.isDarwin then ''
|
|
|
|
export KITTY_NO_LTO=
|
|
|
|
'' else ''
|
2021-07-29 03:15:14 +03:00
|
|
|
export KITTY_EGL_LIBRARY='${lib.getLib libGL}/lib/libEGL.so.1'
|
2020-07-02 11:53:41 +03:00
|
|
|
export KITTY_STARTUP_NOTIFICATION_LIBRARY='${libstartup_notification}/lib/libstartup-notification-1.so'
|
|
|
|
export KITTY_CANBERRA_LIBRARY='${libcanberra}/lib/libcanberra.so'
|
|
|
|
'';
|
|
|
|
}
|