summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristoph Neidahl <christoph.neidahl@gmail.com>2023-09-17 17:26:42 +0200
committerGitHub <noreply@github.com>2023-09-17 17:26:42 +0200
commitc9c1baa66e527ab409f01d10ed3213fd12fd0a3d (patch)
treef117c1ed8374ba2b8616aa8bec3e72eaf5e7733d
parent292e5dc4aecf4faed4c2b8eaa65fc1c3cf5db92e (diff)
downloadnixpkgs-c9c1baa66e527ab409f01d10ed3213fd12fd0a3d.tar
nixpkgs-c9c1baa66e527ab409f01d10ed3213fd12fd0a3d.tar.gz
nixpkgs-c9c1baa66e527ab409f01d10ed3213fd12fd0a3d.tar.bz2
nixpkgs-c9c1baa66e527ab409f01d10ed3213fd12fd0a3d.tar.lz
nixpkgs-c9c1baa66e527ab409f01d10ed3213fd12fd0a3d.tar.xz
nixpkgs-c9c1baa66e527ab409f01d10ed3213fd12fd0a3d.tar.zst
nixpkgs-c9c1baa66e527ab409f01d10ed3213fd12fd0a3d.zip
furnace: 0.6pre9 -> 0.6pre16 (#254979)
* furnace: 0.6pre9 -> 0.6pre16

- Explicitly enable PortAudio audio output option, use system-installed one
- Explicitly enable SDL & OpenGL render options
  - Prefer GL or GLES based on hostPlatform

* furnace: Switch from sha256 to hash

Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>

* furnace: Make GL renderer optional, drop GCC 12 workaround flags

---------

Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
-rw-r--r--pkgs/applications/audio/furnace/default.nix26
1 files changed, 18 insertions, 8 deletions
diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix
index a819cd746ed..bfb09c6de8e 100644
--- a/pkgs/applications/audio/furnace/default.nix
+++ b/pkgs/applications/audio/furnace/default.nix
@@ -18,18 +18,24 @@
 , libjack2
 , withGUI ? true
 , Cocoa
+, portaudio
+, alsa-lib
+# Enable GL/GLES rendering
+, withGL ? !stdenv.hostPlatform.isDarwin
+# Use GLES instead of GL, some platforms have better support for one than the other
+, preferGLES ? stdenv.hostPlatform.isAarch
 }:
 
 stdenv.mkDerivation rec {
   pname = "furnace";
-  version = "0.6pre9";
+  version = "0.6pre16";
 
   src = fetchFromGitHub {
     owner = "tildearrow";
     repo = "furnace";
     rev = "v${version}";
     fetchSubmodules = true;
-    sha256 = "sha256-i7/NN179Wyr1FqNlgryyFtishFr5EY1HI6BRQKby/6E=";
+    hash = "sha256-n66Bv8xB/0KMJYoMILxsaKoaX+E0OFGI3QGqhxKTFUQ=";
   };
 
   postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
@@ -53,8 +59,12 @@ stdenv.mkDerivation rec {
     rtmidi
     SDL2
     zlib
+    portaudio
   ] ++ lib.optionals withJACK [
     libjack2
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    # portaudio pkg-config is pulling this in as a link dependency, not set in propagatedBuildInputs
+    alsa-lib
   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
     Cocoa
   ];
@@ -67,16 +77,16 @@ stdenv.mkDerivation rec {
     "-DSYSTEM_RTMIDI=ON"
     "-DSYSTEM_SDL2=ON"
     "-DSYSTEM_ZLIB=ON"
+    "-DSYSTEM_PORTAUDIO=ON"
     "-DWITH_JACK=${if withJACK then "ON" else "OFF"}"
+    "-DWITH_PORTAUDIO=ON"
+    "-DWITH_RENDER_SDL=ON"
+    "-DWITH_RENDER_OPENGL=${lib.boolToString withGL}"
     "-DWARNINGS_ARE_ERRORS=ON"
+  ] ++ lib.optionals withGL [
+    "-DUSE_GLES=${lib.boolToString preferGLES}"
   ];
 
-  env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
-    # Needed with GCC 12 but breaks on darwin (with clang) or aarch64 (old gcc)
-    "-Wno-error=mismatched-new-delete"
-    "-Wno-error=use-after-free"
-  ]);
-
   postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
     # Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a
     # bundle. That adds alot of overhead for not much benefit (CPack is currently abit broken, and needs impure access