1{ lib
2, stdenv
3, fetchFromGitHub
4, fetchpatch
5
6# Native build inputs
7, cmake
8, pkg-config
9, makeWrapper
10
11# Dependencies
12, alsa-lib
13, freetype
14, curl
15, libglvnd
16, webkitgtk
17, pcre
18, darwin
19}:
20
21stdenv.mkDerivation (finalAttrs: {
22 pname = "juce";
23 version = "7.0.11";
24
25 src = fetchFromGitHub {
26 owner = "juce-framework";
27 repo = "juce";
28 rev = finalAttrs.version;
29 hash = "sha256-XFC+MYxUE3NatM2oYykiPJtiQLy33JD64VZFfZS2Tas=";
30 };
31
32 patches = [
33 (fetchpatch {
34 name = "juce-6.1.2-cmake_install.patch";
35 url = "https://gitlab.archlinux.org/archlinux/packaging/packages/juce/-/raw/4e6d34034b102af3cd762a983cff5dfc09e44e91/juce-6.1.2-cmake_install.patch";
36 hash = "sha256-fr2K/dH0Zam5QKS63zos7eq9QLwdr+bvQL5ZxScagVU=";
37 })
38 ];
39
40 nativeBuildInputs = [
41 cmake
42 pkg-config
43 makeWrapper
44 ];
45
46 buildInputs = [
47 freetype # libfreetype.so
48 curl # libcurl.so
49 stdenv.cc.cc.lib # libstdc++.so libgcc_s.so
50 pcre # libpcre2.pc
51 ] ++ lib.optionals stdenv.isLinux [
52 alsa-lib # libasound.so
53 libglvnd # libGL.so
54 webkitgtk # webkit2gtk-4.0
55 ] ++ lib.optionals stdenv.isDarwin [
56 darwin.apple_sdk.frameworks.Cocoa
57 darwin.apple_sdk.frameworks.MetalKit
58 darwin.apple_sdk.frameworks.WebKit
59 ];
60
61 meta = with lib; {
62 description = "Cross-platform C++ application framework";
63 mainProgram = "juceaide";
64 longDescription = "JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins";
65 homepage = "https://github.com/juce-framework/JUCE";
66 license = with licenses; [ isc gpl3Plus ];
67 maintainers = with maintainers; [ kashw2 ];
68 platforms = platforms.all;
69 };
70})