forked from marko/svitak
81 lines
No EOL
2.5 KiB
Nix
81 lines
No EOL
2.5 KiB
Nix
{
|
|
description = "svitak dev shell (GHC 9.12, GTK4, WebKit 6.0)";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs = { self, nixpkgs }: let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
cLibs = with pkgs; [
|
|
gtk4 webkitgtk_6_0 libsoup_3 glib
|
|
atk pango cairo harfbuzz graphene gdk-pixbuf
|
|
sysprof libsysprof-capture libadwaita
|
|
|
|
libpng freetype fontconfig pixman expat librsvg
|
|
libjpeg libtiff libwebp libdeflate lcms2 woff2 jbigkit graphite2
|
|
lerc libavif libheif openjpeg
|
|
|
|
bzip2 brotli zlib xz zstd lz4
|
|
|
|
wayland wayland-protocols libepoxy libGL libglvnd
|
|
vulkan-headers vulkan-loader
|
|
libx11 libxext libxrender libxi libxcursor
|
|
libxfixes libxdamage libxcomposite libxrandr
|
|
xorgproto libxcb libxkbcommon libdrm mesa
|
|
libxau libxdmcp libxft libxinerama libxtst
|
|
|
|
gst_all_1.gstreamer gst_all_1.gst-plugins-base
|
|
|
|
libinput libevdev xkeyboard_config
|
|
|
|
fribidi libthai libdatrie icu pcre2 enchant shared-mime-info libxml2
|
|
glibcLocales
|
|
|
|
libpsl nghttp2 gnutls libsecret libgcrypt libgpg-error libtasn1 p11-kit dbus
|
|
|
|
util-linux libselinux libsepol libffi sqlite
|
|
];
|
|
|
|
allDeps = cLibs ++ [ pkgs.gobject-introspection ];
|
|
|
|
in {
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
nativeBuildInputs = [
|
|
pkgs.pkg-config
|
|
pkgs.haskell.compiler.ghc912
|
|
pkgs.cabal-install
|
|
pkgs.gobject-introspection
|
|
];
|
|
|
|
buildInputs = cLibs;
|
|
|
|
shellHook = ''
|
|
unset GHC_PACKAGE_PATH
|
|
|
|
export PKG_CONFIG_PATH="${pkgs.lib.makeSearchPathOutput "dev" "lib/pkgconfig" allDeps}:${pkgs.lib.makeSearchPath "lib/pkgconfig" allDeps}:${pkgs.lib.makeSearchPath "share/pkgconfig" allDeps}"
|
|
|
|
export GI_TYPELIB_PATH="${pkgs.lib.makeSearchPathOutput "out" "lib/girepository-1.0" allDeps}:${pkgs.lib.makeSearchPath "lib/girepository-1.0" allDeps}"
|
|
# play around with these if having trouble with the display:
|
|
|
|
# Fontconfig
|
|
export FONTCONFIG_FILE="${pkgs.fontconfig.out}/etc/fonts/fonts.conf"
|
|
|
|
# # Force software rendering
|
|
# export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
|
# export WEBKIT_DISABLE_COMPOSITING_MODE=1
|
|
# export GSK_RENDERER=cairo
|
|
|
|
# export LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive"
|
|
# export LC_ALL="en_US.UTF-8"
|
|
|
|
# Display fallback (Try Wayland first, then X11/Xwayland)
|
|
# export XDG_RUNTIME_DIR="''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
|
|
# export WAYLAND_DISPLAY="''${WAYLAND_DISPLAY:-wayland-0}"
|
|
export GDK_BACKEND="wayland"
|
|
'';
|
|
};
|
|
};
|
|
} |