ghostty/nix/devshell.nix
Hanna 2d7e2c8345 Integrate libadwaita for the gtk backend (#792)
* When using gtk as the backend, link libadwaita

* Update c.zig

* Use libadwaita's theme manager for gtk

* update the documentation for window-theme

* build: add libadwaita to the nix devshell

* forgot to properly import libadwaita

* apprt/gtk: adwaita style change

---------

Co-authored-by: Mitchell Hashimoto <mitchell.hashimoto@gmail.com>
2023-11-02 21:29:29 -07:00

134 lines
1.7 KiB
Nix

{ mkShell, lib, stdenv
, bashInteractive
, gdb
, glxinfo
, ncurses
, nodejs
, nodePackages
, parallel
, pkg-config
, python3
, scdoc
, tracy
, valgrind
, vulkan-loader
, vttest
, wabt
, wasmtime
, wraptest
, zig
, zip
, zls
, llvmPackages_latest
, bzip2
, expat
, fontconfig
, freetype
, glib
, gtk4
, libadwaita
, 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
pixman
zlib
libX11
libXcursor
libXi
libXrandr
libadwaita
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
# Linting
nodePackages.prettier
# 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
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
libadwaita
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;
}