Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 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_4_1, 17 pcre2, 18 libsysprof-capture, 19 util-linuxMinimal, 20 libselinux, 21 libsepol, 22 libthai, 23 libdatrie, 24 libXdmcp, 25 lerc, 26 libxkbcommon, 27 libepoxy, 28 libXtst, 29 sqlite, 30 fontconfig, 31 versionCheckHook, 32 nix-update-script, 33}: 34 35stdenv.mkDerivation (finalAttrs: { 36 pname = "juce"; 37 version = "8.0.8"; 38 39 src = fetchFromGitHub { 40 owner = "juce-framework"; 41 repo = "juce"; 42 tag = finalAttrs.version; 43 hash = "sha256-kp3rMaHWBbEh4UaRMxcLo/DiSJV942OY+LYxh6W7dFc="; 44 }; 45 46 patches = [ 47 # Adapted from https://gitlab.archlinux.org/archlinux/packaging/packages/juce/-/raw/4e6d34034b102af3cd762a983cff5dfc09e44e91/juce-6.1.2-cmake_install.patch 48 # for Juce 8.0.4. 49 ./juce-8.0.4-cmake_install.patch 50 ]; 51 52 nativeBuildInputs = [ 53 cmake 54 pkg-config 55 makeWrapper 56 ]; 57 58 buildInputs = [ 59 freetype # libfreetype.so 60 curl # libcurl.so 61 (lib.getLib stdenv.cc.cc) # libstdc++.so libgcc_s.so 62 pcre2 # libpcre2.pc 63 libsysprof-capture 64 libthai 65 libdatrie 66 lerc 67 libepoxy 68 sqlite 69 ] 70 ++ lib.optionals stdenv.hostPlatform.isLinux [ 71 alsa-lib # libasound.so 72 libglvnd # libGL.so 73 webkitgtk_4_1 # webkit2gtk-4.0 74 util-linuxMinimal 75 libselinux 76 libsepol 77 libXdmcp 78 libxkbcommon 79 libXtst 80 ]; 81 82 propagatedBuildInputs = [ fontconfig ]; 83 84 nativeInstallCheckInputs = [ 85 versionCheckHook 86 ]; 87 versionCheckProgram = "${placeholder "out"}/bin/juceaide"; 88 versionCheckProgramArg = "version"; 89 doInstallCheck = true; 90 91 passthru = { 92 updateScript = nix-update-script { }; 93 }; 94 95 meta = { 96 description = "Cross-platform C++ application framework"; 97 longDescription = "Open-source cross-platform C++ application framework for creating desktop and mobile applications, including VST, VST3, AU, AUv3, AAX and LV2 audio plug-ins"; 98 homepage = "https://juce.com/"; 99 changelog = "https://github.com/juce-framework/JUCE/blob/${finalAttrs.version}/CHANGE_LIST.md"; 100 license = with lib.licenses; [ 101 agpl3Only # Or alternatively the JUCE license, but that would not be included in nixpkgs then 102 ]; 103 maintainers = with lib.maintainers; [ kashw2 ]; 104 platforms = lib.platforms.all; 105 mainProgram = "juceaide"; 106 }; 107})