After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 78e9caf153f5a339bf1d4c000ff6f0a503a369c8
result/bin/apply-formatting $NIXPKGS_PATH
96 lines
2.4 KiB
Nix
96 lines
2.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
gitUpdater,
|
|
pkg-config,
|
|
qmake,
|
|
qt5compat ? null,
|
|
qtbase,
|
|
qttools,
|
|
qtwayland,
|
|
rtaudio_6,
|
|
rtmidi,
|
|
wrapQtAppsHook,
|
|
}:
|
|
|
|
assert lib.versionAtLeast qtbase.version "6.0" -> qt5compat != null;
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "bambootracker";
|
|
version = "0.6.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "BambooTracker";
|
|
repo = "BambooTracker";
|
|
rev = "v${finalAttrs.version}";
|
|
fetchSubmodules = true;
|
|
hash = "sha256-tFUliKR55iZybNyYIF1FXh8RGf8jKEsGrWBuldB277g=";
|
|
};
|
|
|
|
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_6
|
|
rtmidi
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
qtwayland
|
|
]
|
|
++ lib.optionals (lib.versionAtLeast qtbase.version "6.0") [
|
|
qt5compat
|
|
];
|
|
|
|
qmakeFlags =
|
|
[
|
|
"CONFIG+=system_rtaudio"
|
|
"CONFIG+=system_rtmidi"
|
|
]
|
|
++ lib.optionals (stdenv.cc.isClang || (lib.versionAtLeast qtbase.version "6.0")) [
|
|
# Clang is extra-strict about some deprecations
|
|
# Latest Qt6 deprecated QCheckBox::stateChanged(int)
|
|
"CONFIG+=no_warnings_are_errors"
|
|
];
|
|
|
|
postConfigure = "make qmake_all";
|
|
|
|
# Wrapping the inside of the app bundles, avoiding double-wrapping
|
|
dontWrapQtApps = stdenv.hostPlatform.isDarwin;
|
|
|
|
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
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = gitUpdater {
|
|
rev-prefix = "v";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tracker for YM2608 (OPNA) which was used in NEC PC-8801/9801 series computers";
|
|
mainProgram = "BambooTracker";
|
|
homepage = "https://bambootracker.github.io/BambooTracker/";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
};
|
|
})
|