Unsuccessfully trying to make :p2d work
This commit is contained in:
parent
f3bb114b0f
commit
2d70bef400
2 changed files with 38 additions and 9 deletions
1
.envrc
1
.envrc
|
|
@ -1,2 +1 @@
|
||||||
use flake
|
use flake
|
||||||
watch_file *.nix
|
|
||||||
|
|
|
||||||
46
flake.nix
46
flake.nix
|
|
@ -4,16 +4,46 @@
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
(self: super: {
|
||||||
|
jogl = super.jogl.overrideAttrs {
|
||||||
|
# upstream jogl doesn't have the required gluegen lib
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/share/java
|
||||||
|
cp -v $NIX_BUILD_TOP/gluegen/build/gluegen-rt{,-natives-linux-*}.jar $out/share/java/
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/jar/jogl-all{,-natives-linux-*}.jar $out/share/java/
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/nativewindow/nativewindow{,-awt,-natives-linux-*,-os-drm,-os-x11}.jar $out/share/java/
|
||||||
|
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/gluegen/build/obj/*.so $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/gluegen/build/test/build/natives/*.so $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/jogl/obj/jogl/*.so $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/jogl/obj/*.so $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/lib/*.so $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/nativewindow/obj/*.so $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/newt/obj/*.so $out/lib
|
||||||
|
cp -v $NIX_BUILD_TOP/jogl/build/oculusvr/obj/*.so $out/lib
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
in {
|
in {
|
||||||
devShell.${system} = pkgs.mkShell rec {
|
devShells.${system}.default = pkgs.mkShell rec {
|
||||||
name = "quil-env";
|
name = "quil-env";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = [
|
||||||
xorg_sys_opengl
|
pkgs.xorg_sys_opengl
|
||||||
xorg.libXxf86vm
|
pkgs.xorg.libXxf86vm
|
||||||
xwayland
|
pkgs.xwayland
|
||||||
clojure
|
pkgs.clojure
|
||||||
|
# pkgs.jogl
|
||||||
];
|
];
|
||||||
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
||||||
|
|
||||||
|
|
@ -26,7 +56,7 @@
|
||||||
# we need to make sure the library is on the path for JOGL;
|
# we need to make sure the library is on the path for JOGL;
|
||||||
# also, there's a bug that is avoided with the variable
|
# also, there's a bug that is avoided with the variable
|
||||||
# https://github.com/processing/processing/issues/5476
|
# https://github.com/processing/processing/issues/5476
|
||||||
JAVA_OPTS = "-Djogl.disable.openglcore=false";
|
# JAVA_OPTS = "-Djogl.disable.openglcore=false";
|
||||||
# XDG_SESSION_TYPE = "wayland";
|
# XDG_SESSION_TYPE = "wayland";
|
||||||
# LIBGL_ALWAYS_SOFTWARE = true; # ← this is the same as passing -Djogl.disable.openglcore="true"
|
# LIBGL_ALWAYS_SOFTWARE = true; # ← this is the same as passing -Djogl.disable.openglcore="true"
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue