about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/bambootracker/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/bambootracker/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/audio/bambootracker/default.nix43
1 files changed, 19 insertions, 24 deletions
diff --git a/nixpkgs/pkgs/applications/audio/bambootracker/default.nix b/nixpkgs/pkgs/applications/audio/bambootracker/default.nix
index 592b0fb07300..5d89813216dc 100644
--- a/nixpkgs/pkgs/applications/audio/bambootracker/default.nix
+++ b/nixpkgs/pkgs/applications/audio/bambootracker/default.nix
@@ -1,50 +1,45 @@
 { mkDerivation
-, lib, stdenv
+, lib
+, stdenv
 , fetchFromGitHub
 , qmake
-, qtbase
+, pkg-config
 , qttools
-, alsaSupport ? stdenv.hostPlatform.isLinux
-, alsaLib
-, pulseSupport ? stdenv.hostPlatform.isLinux
-, libpulseaudio
-, jackSupport ? stdenv.hostPlatform.isUnix
-, libjack2
+, qtbase
+, rtaudio
+, rtmidi
 }:
-let
 
-  inherit (lib) optional optionals;
-
-in
 mkDerivation rec {
   pname = "bambootracker";
-  version = "0.4.5";
+  version = "0.4.6";
 
   src = fetchFromGitHub {
     owner = "rerrahkr";
     repo = "BambooTracker";
     rev = "v${version}";
-    sha256 = "0ibi0sykxf6cp5la2c4pgxf5gvy56yv259fbmdwdrdyv6vlddf42";
+    sha256 = "0iddqfw951dw9xpl4w7310sl4z544507ppb12i8g4fzvlxfw2ifc";
   };
 
-  sourceRoot = "source/BambooTracker";
+  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    substituteInPlace BambooTracker/BambooTracker.pro \
+      --replace '# Temporary known-error downgrades here' 'CPP_WARNING_FLAGS += -Wno-missing-braces'
+  '';
+
+  nativeBuildInputs = [ qmake qttools pkg-config ];
 
-  nativeBuildInputs = [ qmake qttools ];
+  buildInputs = [ qtbase rtaudio rtmidi ];
 
-  buildInputs = [ qtbase ]
-    ++ optional alsaSupport alsaLib
-    ++ optional pulseSupport libpulseaudio
-    ++ optional jackSupport libjack2;
+  qmakeFlags = [ "CONFIG+=system_rtaudio" "CONFIG+=system_rtmidi" ];
 
-  qmakeFlags = [ "CONFIG+=release" "CONFIG-=debug" ]
-    ++ optional pulseSupport "CONFIG+=use_pulse"
-    ++ optionals jackSupport [ "CONFIG+=use_jack" "CONFIG+=jack_has_rename" ];
+  postConfigure = "make qmake_all";
 
   meta = with lib; {
     description = "A tracker for YM2608 (OPNA) which was used in NEC PC-8801/9801 series computers";
-    homepage = "https://github.com/rerrahkr/BambooTracker";
+    homepage = "https://rerrahkr.github.io/BambooTracker";
     license = licenses.gpl2Only;
     platforms = platforms.all;
     maintainers = with maintainers; [ OPNA2608 ];
+    broken = stdenv.isDarwin;
   };
 }