shell.nix: make more similar to the code in Nixpkgs

Remove the dependency on installShellFiles as it is not needed for building kitty itself and is only used in Nixpkgs for conveniently installing man pages and shell completions.
pkgconfig has been renamed to pkg-config.
Use `with python3Packages;` to reduce code duplication. This is how it's done in Nixpkgs as well.
Also sort the packages in nativeBuildInputs.
This commit is contained in:
Luflosi 2021-08-17 17:43:49 +02:00
parent 4066c2389d
commit a69170b0ba
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0

View File

@ -7,6 +7,7 @@ let
inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics Foundation IOKit Kernel OpenGL;
harfbuzzWithCoreText = harfbuzz.override { withCoreText = stdenv.isDarwin; };
in
with python3Packages;
mkShell rec {
buildInputs = [
harfbuzzWithCoreText
@ -29,17 +30,18 @@ mkShell rec {
] ++ checkInputs;
nativeBuildInputs = [
pkgconfig python3Packages.sphinx ncurses
ncurses
pkg-config
sphinx
] ++ optionals stdenv.isDarwin [
imagemagick
libicns # For the png2icns tool.
installShellFiles
];
propagatedBuildInputs = optional stdenv.isLinux libGL;
checkInputs = [
python3Packages.pillow
pillow
];
# Causes build failure due to warning when using Clang