MIDIVisualizer: Add Darwin support
This commit is contained in:
parent
c29a8f344a
commit
dba05fbc27
|
@ -1,5 +1,24 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, glfw, makeWrapper,
|
{ lib
|
||||||
libXrandr, libXinerama, libXcursor, gtk3, ffmpeg-full, ...}:
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, pkg-config
|
||||||
|
, libX11
|
||||||
|
, glfw
|
||||||
|
, makeWrapper
|
||||||
|
, libXrandr
|
||||||
|
, libXinerama
|
||||||
|
, libXcursor
|
||||||
|
, gtk3
|
||||||
|
, ffmpeg-full
|
||||||
|
, AppKit
|
||||||
|
, Carbon
|
||||||
|
, Cocoa
|
||||||
|
, CoreAudio
|
||||||
|
, CoreMIDI
|
||||||
|
, CoreServices
|
||||||
|
, Kernel
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "MIDIVisualizer";
|
pname = "MIDIVisualizer";
|
||||||
|
@ -15,16 +34,29 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ cmake pkg-config makeWrapper];
|
nativeBuildInputs = [ cmake pkg-config makeWrapper];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libX11
|
|
||||||
glfw
|
glfw
|
||||||
|
ffmpeg-full
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
libX11
|
||||||
libXrandr
|
libXrandr
|
||||||
libXinerama
|
libXinerama
|
||||||
libXcursor
|
libXcursor
|
||||||
gtk3
|
gtk3
|
||||||
ffmpeg-full
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
AppKit
|
||||||
|
Carbon
|
||||||
|
Cocoa
|
||||||
|
CoreAudio
|
||||||
|
CoreMIDI
|
||||||
|
CoreServices
|
||||||
|
Kernel
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = if stdenv.isDarwin then ''
|
||||||
|
mkdir -p $out/Applications $out/bin
|
||||||
|
cp -r MIDIVisualizer.app $out/Applications/
|
||||||
|
ln -s ../Applications/MIDIVisualizer.app/Contents/MacOS/MIDIVisualizer $out/bin/
|
||||||
|
'' else ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp MIDIVisualizer $out/bin
|
cp MIDIVisualizer $out/bin
|
||||||
|
|
||||||
|
@ -36,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||||
description = "A small MIDI visualizer tool, using OpenGL";
|
description = "A small MIDI visualizer tool, using OpenGL";
|
||||||
homepage = "https://github.com/kosua20/MIDIVisualizer";
|
homepage = "https://github.com/kosua20/MIDIVisualizer";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.ericdallo ];
|
maintainers = [ maintainers.ericdallo ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -21582,7 +21582,9 @@ with pkgs;
|
||||||
|
|
||||||
micropython = callPackage ../development/interpreters/micropython { };
|
micropython = callPackage ../development/interpreters/micropython { };
|
||||||
|
|
||||||
MIDIVisualizer = callPackage ../applications/audio/midi-visualizer { };
|
MIDIVisualizer = callPackage ../applications/audio/midi-visualizer {
|
||||||
|
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Carbon CoreAudio CoreMIDI CoreServices Kernel;
|
||||||
|
};
|
||||||
|
|
||||||
mimalloc = callPackage ../development/libraries/mimalloc { };
|
mimalloc = callPackage ../development/libraries/mimalloc { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue