heyarne.aphorisms/flake.nix

36 lines
1.2 KiB
Nix

{
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
lib = pkgs.lib;
in {
devShells.${system}.default = pkgs.mkShell rec {
name = "quil-env";
buildInputs = [
pkgs.clojure
pkgs.libGL
pkgs.libxxf86vm
# pkgs.jogl
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
JAVA_OPTS = "-Dawt.useSystemAAFontSettings=lcd";
# 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";
# XDG_SESSION_TYPE = "wayland";
# LIBGL_ALWAYS_SOFTWARE = true; # ← this is the same as passing -Djogl.disable.openglcore="true"
};
};
}