nixpkgs/pkgs/applications/audio/midi-visualizer/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.5 KiB
Nix
Raw Normal View History

2022-12-14 02:21:33 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, libX11
, glfw
, makeWrapper
, libXrandr
, libXinerama
, libXcursor
, gtk3
, ffmpeg-full
, AppKit
, Carbon
, Cocoa
, CoreAudio
, CoreMIDI
, CoreServices
, Kernel
}:
2020-07-27 02:33:06 +00:00
stdenv.mkDerivation rec {
pname = "MIDIVisualizer";
2022-12-15 10:05:21 +00:00
version = "7.0";
2020-07-27 02:33:06 +00:00
src = fetchFromGitHub {
owner = "kosua20";
repo = pname;
rev = "v${version}";
2022-12-15 10:05:21 +00:00
sha256 = "sha256-wfPSPH+E9cErVvfJZqHttFtjiUYJopM/u6w6NpRHifE=";
2020-07-27 02:33:06 +00:00
};
nativeBuildInputs = [ cmake pkg-config makeWrapper];
buildInputs = [
glfw
2022-12-14 02:21:33 +00:00
ffmpeg-full
] ++ lib.optionals stdenv.isLinux [
libX11
2020-07-27 02:33:06 +00:00
libXrandr
libXinerama
libXcursor
gtk3
2022-12-14 02:21:33 +00:00
] ++ lib.optionals stdenv.isDarwin [
AppKit
Carbon
Cocoa
CoreAudio
CoreMIDI
CoreServices
Kernel
2020-07-27 02:33:06 +00:00
];
2022-12-14 02:21:33 +00:00
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 ''
2020-07-27 02:33:06 +00:00
mkdir -p $out/bin
cp MIDIVisualizer $out/bin
wrapProgram $out/bin/MIDIVisualizer \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS"
'';
meta = with lib; {
2020-07-27 02:33:06 +00:00
description = "A small MIDI visualizer tool, using OpenGL";
mainProgram = "MIDIVisualizer";
2020-07-27 02:33:06 +00:00
homepage = "https://github.com/kosua20/MIDIVisualizer";
license = licenses.mit;
2022-12-14 02:21:33 +00:00
platforms = platforms.unix;
2020-07-27 02:33:06 +00:00
maintainers = [ maintainers.ericdallo ];
};
}