From 4956092296959c0c6369acaef7ddf4c2dc0f73fa Mon Sep 17 00:00:00 2001 From: arne Date: Sun, 20 Nov 2022 17:45:06 +0100 Subject: [PATCH] Fix project --- flake.nix | 23 ++++++++++++++++++++++- shell.nix | 25 ------------------------- src/aphorisms/quil/drawable.clj | 2 +- 3 files changed, 23 insertions(+), 27 deletions(-) delete mode 100644 shell.nix diff --git a/flake.nix b/flake.nix index c0248c9..4beec3b 100644 --- a/flake.nix +++ b/flake.nix @@ -5,7 +5,28 @@ let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; + lib = pkgs.lib; in { - devShell.${system} = import ./shell.nix { inherit pkgs; }; + devShell.${system} = pkgs.mkShell rec { + name = "quil-env"; + buildInputs = with pkgs; [ + xorg_sys_opengl + # 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 = "-Djava.library.path=${lib.makeLibraryPath buildInputs} -Djogl.disable.openglcore=true"; + # LIBGL_ALWAYS_SOFTWARE = true; # ← this is the same as passing -Djogl.disable.openglcore="true" + }; }; } diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 344a944..0000000 --- a/shell.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ pkgs ? import { }, }: - -let - lib = pkgs.lib; -in pkgs.mkShell rec { - name = "quil-env"; - buildInputs = with pkgs; [ - xorg_sys_opengl - 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 = "-Djava.library.path=${lib.makeLibraryPath buildInputs} -Djogl.disable.openglcore=true"; - # LIBGL_ALWAYS_SOFTWARE = true; # ← this is the same as passing -Djogl.disable.openglcore="true" -} diff --git a/src/aphorisms/quil/drawable.clj b/src/aphorisms/quil/drawable.clj index 6f994b3..4319962 100644 --- a/src/aphorisms/quil/drawable.clj +++ b/src/aphorisms/quil/drawable.clj @@ -27,7 +27,7 @@ ([poly attrs] (quil-attrs! attrs) (doseq [[a b] (partition 2 1 (:points poly))] - (q/poly a b)))) + (q/line a b)))) Line2 (draw