Skip to content

Commit

Permalink
juce: 7.0.11 → 8.0.4 (NixOS#356771)
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst authored Dec 24, 2024
2 parents dcbfd14 + 30463d9 commit 49291ae
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 40 deletions.
105 changes: 65 additions & 40 deletions pkgs/development/misc/juce/default.nix
Original file line number Diff line number Diff line change
@@ -1,40 +1,51 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,

# Native build inputs
, cmake
, pkg-config
, makeWrapper
# Native build inputs
cmake,
pkg-config,
makeWrapper,

# Dependencies
, alsa-lib
, freetype
, curl
, libglvnd
, webkitgtk_4_0
, pcre
, darwin
# Dependencies
alsa-lib,
freetype,
curl,
libglvnd,
webkitgtk_4_0,
pcre2,
libsysprof-capture,
util-linuxMinimal,
libselinux,
libsepol,
libthai,
libdatrie,
libXdmcp,
lerc,
libxkbcommon,
libepoxy,
libXtst,
sqlite,
fontconfig,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "juce";
version = "7.0.11";
version = "8.0.4";

src = fetchFromGitHub {
owner = "juce-framework";
repo = "juce";
rev = finalAttrs.version;
hash = "sha256-XFC+MYxUE3NatM2oYykiPJtiQLy33JD64VZFfZS2Tas=";
hash = "sha256-iAueT+yHwUUHOzqfK5zXEZQ0GgOKJ9q9TyRrVfWdewc=";
};

patches = [
(fetchpatch {
name = "juce-6.1.2-cmake_install.patch";
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/juce/-/raw/4e6d34034b102af3cd762a983cff5dfc09e44e91/juce-6.1.2-cmake_install.patch";
hash = "sha256-fr2K/dH0Zam5QKS63zos7eq9QLwdr+bvQL5ZxScagVU=";
})
# Adapted from https://gitlab.archlinux.org/archlinux/packaging/packages/juce/-/raw/4e6d34034b102af3cd762a983cff5dfc09e44e91/juce-6.1.2-cmake_install.patch
# for Juce 8.0.4.
./juce-8.0.4-cmake_install.patch
];

nativeBuildInputs = [
Expand All @@ -43,28 +54,42 @@ stdenv.mkDerivation (finalAttrs: {
makeWrapper
];

buildInputs = [
freetype # libfreetype.so
curl # libcurl.so
(lib.getLib stdenv.cc.cc) # libstdc++.so libgcc_s.so
pcre # libpcre2.pc
] ++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib # libasound.so
libglvnd # libGL.so
webkitgtk_4_0 # webkit2gtk-4.0
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Cocoa
darwin.apple_sdk.frameworks.MetalKit
darwin.apple_sdk.frameworks.WebKit
];
buildInputs =
[
freetype # libfreetype.so
curl # libcurl.so
(lib.getLib stdenv.cc.cc) # libstdc++.so libgcc_s.so
pcre2 # libpcre2.pc
libsysprof-capture
libthai
libdatrie
lerc
libepoxy
sqlite
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib # libasound.so
libglvnd # libGL.so
webkitgtk_4_0 # webkit2gtk-4.0
util-linuxMinimal
libselinux
libsepol
libXdmcp
libxkbcommon
libXtst
];

propagatedBuildInputs = [ fontconfig ];

meta = with lib; {
description = "Cross-platform C++ application framework";
mainProgram = "juceaide";
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";
homepage = "https://github.com/juce-framework/JUCE";
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";
homepage = "https://juce.com/";
changelog = "https://github.com/juce-framework/JUCE/blob/${finalAttrs.version}/CHANGE_LIST.md";
license = with licenses; [ isc gpl3Plus ];
license = with licenses; [
agpl3Only # Or alternatively the JUCE license, but that would not be included in nixpkgs then
];
maintainers = with maintainers; [ kashw2 ];
platforms = platforms.all;
};
Expand Down
51 changes: 51 additions & 0 deletions pkgs/development/misc/juce/juce-8.0.4-cmake_install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 019aa86c51..ceb7b2a8e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,10 +137,10 @@
VERSION ${JUCE_VERSION}
COMPATIBILITY ExactVersion)

-set(JUCE_INSTALL_DESTINATION "lib/cmake/JUCE-${JUCE_VERSION}" CACHE STRING
+set(JUCE_INSTALL_DESTINATION "lib/cmake/juce" CACHE STRING
"The location, relative to the install prefix, where the JUCE config file will be installed")

-set(JUCE_MODULE_PATH "include/JUCE-${JUCE_VERSION}/modules")
+set(JUCE_MODULE_PATH "share/juce/modules")
set(UTILS_INSTALL_DIR "${JUCE_INSTALL_DESTINATION}")
set(JUCEAIDE_PATH "${JUCE_TOOL_INSTALL_DIR}/${JUCE_JUCEAIDE_NAME}")
configure_package_config_file("${JUCE_CMAKE_UTILS_DIR}/JUCEConfig.cmake.in"
@@ -148,7 +148,6 @@
PATH_VARS UTILS_INSTALL_DIR JUCEAIDE_PATH JUCE_MODULE_PATH
INSTALL_DESTINATION "${JUCE_INSTALL_DESTINATION}")

-set(JUCE_MODULE_PATH "${JUCE_MODULES_DIR}")
set(UTILS_INSTALL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extras/Build/CMake")
get_target_property(JUCEAIDE_PATH juceaide IMPORTED_LOCATION)
configure_package_config_file("${JUCE_CMAKE_UTILS_DIR}/JUCEConfig.cmake.in"
diff --git a/extras/Build/juceaide/CMakeLists.txt b/extras/Build/juceaide/CMakeLists.txt
index 7ef20eddf1..3dfb1f1802 100644
--- a/extras/Build/juceaide/CMakeLists.txt
+++ b/extras/Build/juceaide/CMakeLists.txt
@@ -153,7 +153,7 @@

add_executable(juce::juceaide ALIAS juceaide)

- set(JUCE_TOOL_INSTALL_DIR "bin/JUCE-${JUCE_VERSION}" CACHE STRING
+ set(JUCE_TOOL_INSTALL_DIR "bin" CACHE STRING
"The location, relative to the install prefix, where juceaide will be installed")

install(PROGRAMS "${imported_location}" DESTINATION "${JUCE_TOOL_INSTALL_DIR}")
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 27c987abe2..5b8de75bde 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -31,7 +31,7 @@
# ==============================================================================

juce_add_modules(
- INSTALL_PATH "include/JUCE-${JUCE_VERSION}/modules"
+ INSTALL_PATH "share/juce/modules"
ALIAS_NAMESPACE juce
juce_analytics
juce_animation

0 comments on commit 49291ae

Please sign in to comment.