heyarne.aphorisms/flake.nix
arne b624396bd1 Fix problems with wayland / x11 again
I first installed a global `xwayland` alongside this, but it seems fine
without?
2022-12-18 12:14:38 +01:00

33 lines
1.1 KiB
Nix

{
inputs.nixpkgs.url = github:NixOS/nixpkgs;
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
in {
devShell.${system} = pkgs.mkShell rec {
name = "quil-env";
buildInputs = with pkgs; [
xorg_sys_opengl
xorg.libXxf86vm
# xwayland
clojure
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
# wayland compat
# see https://discourse.ubuntu.com/t/environment-variables-for-wayland-hackers/12750
# WAYLAND_DISPLAY = "no";
# DISPLAY = ":0";
# _JAVA_AWT_WM_NONREPARENTING = "1";
# we need to make sure the library is on the path for JOGL;
# also, there's a bug that is avoided with the variable
# https://github.com/processing/processing/issues/5476
JAVA_OPTS = "-Djogl.disable.openglcore=false";
# LIBGL_ALWAYS_SOFTWARE = true; # ← this is the same as passing -Djogl.disable.openglcore="true"
};
};
}