Unverified Commit 852ce9ce authored by Guy Chronister's avatar Guy Chronister
Browse files

opl3bankeditor: migrate to by-name, hardcode values

parent f3822af2
Loading
Loading
Loading
Loading
+0 −0

File moved.

+69 −0
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  fetchFromGitHub,
  dos2unix,
  cmake,
  pkg-config,
  libsForQt5,
  rtaudio,
  rtmidi,
}:

stdenv.mkDerivation rec {
  pname = "opl3bankeditor";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "Wohlstand";
    repo = "opl3bankeditor";
    rev = "v${version}";
    sha256 = "08krbxlxgmc7i2r2k6d6wgi0m6k8hh3j60xf21kz4kp023w613sa";
  };

  prePatch = ''
    dos2unix CMakeLists.txt
  '';

  patches = [
    ./0001-opl3bankeditor-Look-for-system-installed-Rt-libs.patch
  ];

  nativeBuildInputs = [
    dos2unix
    cmake
    pkg-config
    libsForQt5.qttools
    libsForQt5.wrapQtAppsHook
  ];

  buildInputs = [
    libsForQt5.qtbase
    libsForQt5.qwt6_1
    rtaudio
    rtmidi
  ];

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace-fail "cmake_minimum_required(VERSION 3.2)" "cmake_minimum_required(VERSION 3.10)"
  '';

  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
    mkdir $out/{bin,Applications}
    mv "OPL3 Bank Editor.app" $out/Applications/

    install_name_tool -change {,${libsForQt5.qwt6_1}/lib/}libqwt.6.dylib "$out/Applications/OPL3 Bank Editor.app/Contents/MacOS/OPL3 Bank Editor"

    ln -s "$out/Applications/OPL3 Bank Editor.app/Contents/MacOS/OPL3 Bank Editor" $out/bin/opl3_bank_editor
  '';

  meta = {
    mainProgram = "opl3_bank_editor";
    description = "Small cross-platform editor of the OPL3 FM banks of different formats";
    homepage = src.meta.homepage;
    license = lib.licenses.gpl3Plus;
    platforms = lib.platforms.all;
    maintainers = with lib.maintainers; [ OPNA2608 ];
  };
}
+0 −9
Original line number Diff line number Diff line
import ./common.nix {
  pname = "opl3bankeditor";
  chip = "OPL3";
  version = "1.5.1";
  sha256 = "08krbxlxgmc7i2r2k6d6wgi0m6k8hh3j60xf21kz4kp023w613sa";
  extraPatches = [
    ./0001-opl3bankeditor-Look-for-system-installed-Rt-libs.patch
  ];
}
+0 −1
Original line number Diff line number Diff line
@@ -3180,7 +3180,6 @@ with pkgs;

  optifine = optifinePackages.optifine-latest;

  opl3bankeditor = libsForQt5.callPackage ../tools/audio/opl3bankeditor { };
  opn2bankeditor = libsForQt5.callPackage ../tools/audio/opl3bankeditor/opn2bankeditor.nix { };

  p4c = callPackage ../development/compilers/p4c {