ghostty/nix/devshell.nix
Thorsten Ball d86de34cf1 nix: add latest version of zls to flake.nix
I know not everybody uses ZLS (or LSPs in general) but I think it's very
useful and it's very handy to have it in the `flake.nix` to keep it up
to date with the `zig` version.

As with a lot of my PRs in this project, please consider the following a
disclaimer: I have 0 clue what I'm doing here and if there's a better
way to do what I'm trying to do, let me know!
2023-09-09 15:18:05 +02:00

132 lines
1.7 KiB
Nix

{ mkShell, lib, stdenv
, bashInteractive
, debugedit
, flatpak-builder
, gdb
, glxinfo
, ncurses
, nodejs
, parallel
, pkg-config
, python3
, scdoc
, tracy
, valgrind
, vulkan-loader
, vttest
, wabt
, wasmtime
, wraptest
, zig
, zip
, zls
, llvmPackages_latest
, bzip2
, expat
, fontconfig
, freetype
, glib
, gtk4
, harfbuzz
, libpng
, libGL
, libX11
, libXcursor
, libXext
, libXi
, libXinerama
, libXrandr
, pixman
, zlib
}:
let
# See package.nix. Keep in sync.
rpathLibs = [
libGL
] ++ lib.optionals stdenv.isLinux [
bzip2
expat
fontconfig
freetype
harfbuzz
libpng
zlib
libX11
libXcursor
libXi
libXrandr
gtk4
glib
];
in mkShell rec {
name = "ghostty";
nativeBuildInputs = [
# For builds
llvmPackages_latest.llvm
ncurses
pkg-config
scdoc
zig
zip
zls
# For web and wasm stuff
nodejs
# Testing
parallel
python3
tracy
vttest
# wasm
wabt
wasmtime
] ++ lib.optionals stdenv.isLinux [
# My nix shell environment installs the non-interactive version
# by default so we have to include this.
bashInteractive
# Flatpak builds
debugedit
flatpak-builder
gdb
valgrind
wraptest
];
buildInputs = [
# TODO: non-linux
] ++ lib.optionals stdenv.isLinux [
bzip2
expat
fontconfig
freetype
harfbuzz
libpng
pixman
zlib
libX11
libXcursor
libXext
libXi
libXinerama
libXrandr
# Only needed for GTK builds
gtk4
glib
];
# This should be set onto the rpath of the ghostty binary if you want
# it to be "portable" across the system.
LD_LIBRARY_PATH = lib.makeLibraryPath rpathLibs;
}