Unverified Commit e24affc1 authored by Christoph Neidahl's avatar Christoph Neidahl Committed by GitHub
Browse files

bambootracker, bambootracker-qt6: 0.6.1 -> 0.6.2 (#246769)

* bambootracker, bambootracker-qt6: Convert to finalAttrs, add updateScript

* bambootracker, bambootracker-qt6: 0.6.1 -> 0.6.2
parent db4eaf5d
Loading
Loading
Loading
Loading
+18 −8
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitHub
, gitUpdater
, pkg-config
, qmake
, qt5compat ? null
, qtbase
, qttools
, qtwayland
, rtaudio
, rtmidi
, wrapQtAppsHook
@@ -13,16 +15,16 @@

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

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "bambootracker";
  version = "0.6.1";
  version = "0.6.2";

  src = fetchFromGitHub {
    owner = "BambooTracker";
    repo = "BambooTracker";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    fetchSubmodules = true;
    hash = "sha256-Ymi1tjJCgStF0Rtseelq/YuTtBs2PrbF898TlbjyYUw=";
    hash = "sha256-rn6PNxVsLEXz8q3nvMMhKV1/Woq2CxROf0qsQJykyUs=";
  };

  postPatch = lib.optionalString (lib.versionAtLeast qtbase.version "6.0") ''
@@ -41,14 +43,16 @@ stdenv.mkDerivation rec {

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

  qmakeFlags = [
    "CONFIG+=system_rtaudio"
    # we don't have RtAudio 6 yet: https://github.com/NixOS/nixpkgs/pull/245075
    # "CONFIG+=system_rtaudio"
    "CONFIG+=system_rtmidi"
  ];

@@ -64,6 +68,12 @@ stdenv.mkDerivation rec {
    wrapQtApp $out/Applications/BambooTracker.app/Contents/MacOS/BambooTracker
  '';

  passthru = {
    updateScript = gitUpdater {
      rev-prefix = "v";
    };
  };

  meta = with lib; {
    description = "A tracker for YM2608 (OPNA) which was used in NEC PC-8801/9801 series computers";
    homepage = "https://bambootracker.github.io/BambooTracker/";
@@ -71,4 +81,4 @@ stdenv.mkDerivation rec {
    platforms = platforms.all;
    maintainers = with maintainers; [ OPNA2608 ];
  };
}
})