diff options
author | a-n-n-a-l-e-e <150648636+a-n-n-a-l-e-e@users.noreply.github.com> | 2024-01-18 18:12:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 18:12:02 -0800 |
commit | cec45edc48df6fa51f9ca1106320eee3a7fe693f (patch) | |
tree | df920a2562d586e98e800e3afdbe969d8630eaef /pkgs/by-name/sh | |
parent | 33dd4c5bc577ded23b94de0c9417cebb0ae5063e (diff) | |
parent | 2fda1c969d6fd3dd6c6ab616b17f7f0d4d211ca7 (diff) |
Merge pull request #277901 from minijackson/init-show-midi
show-midi: init at 0.8.0
Diffstat (limited to 'pkgs/by-name/sh')
-rw-r--r-- | pkgs/by-name/sh/show-midi/package.nix | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/pkgs/by-name/sh/show-midi/package.nix b/pkgs/by-name/sh/show-midi/package.nix new file mode 100644 index 0000000000000..e1a433fc8fb49 --- /dev/null +++ b/pkgs/by-name/sh/show-midi/package.nix @@ -0,0 +1,83 @@ +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, alsa-lib +, freetype +, libX11 +, libXrandr +, libXinerama +, libXext +, libXcursor +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "show-midi"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "gbevin"; + repo = "ShowMIDI"; + rev = finalAttrs.version; + hash = "sha256-BtkfeHZyeSZH6wIojj3dd2nCS5R535dSWsis/hXJbPc="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ + alsa-lib + freetype + libX11 + libXrandr + libXinerama + libXext + libXcursor + ]; + + enableParallelBuilding = true; + + makeFlags = [ + "-C Builds/LinuxMakefile" + "CONFIG=Release" + # Specify targets by hand, because it tries to build VST by default, + # even though it's not supported in JUCE anymore + "LV2" + "LV2_MANIFEST_HELPER" + "Standalone" + "VST3" + "VST3_MANIFEST_HELPER" + ]; + + installPhase = '' + runHook preInstall + + install -Dt $out/share/ShowMIDI/themes Themes/* + + mkdir -p $out/bin $out/lib/lv2 $out/lib/vst3 + cd Builds/LinuxMakefile/build/ + cp -r ShowMIDI.lv2 $out/lib/lv2 + cp -r ShowMIDI.vst3 $out/lib/vst3 + cp ShowMIDI $out/bin + + runHook postInstall + ''; + + # JUCE dlopens these, make sure they are in rpath + # Otherwise, segfault will happen + env.NIX_LDFLAGS = toString [ + "-lX11" + "-lXext" + "-lXcursor" + "-lXinerama" + "-lXrandr" + ]; + + meta = with lib; { + description = "Multi-platform GUI application to effortlessly visualize MIDI activity"; + homepage = "https://github.com/gbevin/ShowMIDI"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ minijackson ]; + mainProgram = "ShowMIDI"; + platforms = platforms.linux; + }; +}) |