Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 38 additions & 10 deletions pkgs/applications/audio/bambootracker/default.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,67 @@
{ mkDerivation
, stdenv
{ stdenv
, lib
, fetchFromGitHub
, qmake
, pkg-config
, qttools
, qmake
, qt5compat ? null
, qtbase
, qttools
Comment thread
wegank marked this conversation as resolved.
Outdated
, rtaudio
, rtmidi
, wrapQtAppsHook
}:

mkDerivation rec {
assert lib.versionAtLeast qtbase.version "6.0" -> qt5compat != null;

stdenv.mkDerivation rec {
pname = "bambootracker";
version = "0.6.0";
version = "0.6.1";

src = fetchFromGitHub {
owner = "BambooTracker";
repo = "BambooTracker";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-yubaKTc8NFLxMY0/5c2VubRHgAGOsRlitmXJ1UHzl60=";
hash = "sha256-Ymi1tjJCgStF0Rtseelq/YuTtBs2PrbF898TlbjyYUw=";
};

nativeBuildInputs = [ qmake qttools pkg-config ];
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
qttools
wrapQtAppsHook
];

buildInputs = [ qtbase rtaudio rtmidi ];
buildInputs = [
qtbase
rtaudio
rtmidi
] ++ lib.optionals (lib.versionAtLeast qtbase.version "6.0") [
qt5compat
];

qmakeFlags = [ "CONFIG+=system_rtaudio" "CONFIG+=system_rtmidi" ];
qmakeFlags = [
"CONFIG+=system_rtaudio"
"CONFIG+=system_rtmidi"
];

postConfigure = "make qmake_all";

# Wrapping the inside of the app bundles, avoiding double-wrapping
dontWrapQtApps = stdenv.hostPlatform.isDarwin;
Comment thread
wegank marked this conversation as resolved.
Outdated

postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv $out/{bin,Applications}/BambooTracker.app
ln -s $out/{Applications/BambooTracker.app/Contents/MacOS,bin}/BambooTracker
wrapQtApp $out/Applications/BambooTracker.app/Contents/MacOS/BambooTracker
'';

meta = with lib; {
Expand Down
13 changes: 12 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28232,7 +28232,18 @@ with pkgs;

azpainter = callPackage ../applications/graphics/azpainter { };

bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker { };
bambootracker = libsForQt5.callPackage ../applications/audio/bambootracker {
stdenv = if stdenv.hostPlatform.isDarwin then
darwin.apple_sdk_11_0.stdenv
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 { };

Expand Down