diff --git a/pkgs/applications/audio/bambootracker/default.nix b/pkgs/applications/audio/bambootracker/default.nix index d636d03eb009..0cb33062bd0e 100644 --- a/pkgs/applications/audio/bambootracker/default.nix +++ b/pkgs/applications/audio/bambootracker/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , pkg-config , qmake +, qt5compat ? null , qtbase , qttools , rtaudio @@ -10,6 +11,8 @@ , wrapQtAppsHook }: +assert lib.versionAtLeast qtbase.version "6.0" -> qt5compat != null; + stdenv.mkDerivation rec { pname = "bambootracker"; version = "0.6.1"; @@ -22,6 +25,13 @@ stdenv.mkDerivation rec { hash = "sha256-Ymi1tjJCgStF0Rtseelq/YuTtBs2PrbF898TlbjyYUw="; }; + postPatch = lib.optionalString (lib.versionAtLeast qtbase.version "6.0") '' + # Work around lrelease finding in qmake being broken by using pre-Qt5.12 code path + # https://github.com/NixOS/nixpkgs/issues/214765 + substituteInPlace BambooTracker/lang/lang.pri \ + --replace 'equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 12)' 'if(true)' + ''; + nativeBuildInputs = [ pkg-config qmake @@ -33,6 +43,8 @@ stdenv.mkDerivation rec { qtbase rtaudio rtmidi + ] ++ lib.optionals (lib.versionAtLeast qtbase.version "6.0") [ + qt5compat ]; qmakeFlags = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9e46e1423044..57134b1b8af1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28238,6 +28238,12 @@ with pkgs; else stdenv; }; + bambootracker-qt6 = qt6Packages.callPackage ../applications/audio/bambootracker { + stdenv = if stdenv.hostPlatform.isDarwin then + darwin.apple_sdk_11_0.stdenv + else + stdenv; + }; blocky = callPackage ../applications/networking/blocky { };