From 30463d9064d976f3549d807491e594aa1235d852 Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Wed, 18 Dec 2024 21:08:02 +0100 Subject: [PATCH] =?UTF-8?q?juce=208.0.3=20=E2=86=92=208.0.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/misc/juce/default.nix | 12 ++--- .../misc/juce/juce-8.0.4-cmake_install.patch | 51 +++++++++++++++++++ 2 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 pkgs/development/misc/juce/juce-8.0.4-cmake_install.patch diff --git a/pkgs/development/misc/juce/default.nix b/pkgs/development/misc/juce/default.nix index 32ea30afd60da..62c11bc4c5b22 100644 --- a/pkgs/development/misc/juce/default.nix +++ b/pkgs/development/misc/juce/default.nix @@ -33,21 +33,19 @@ stdenv.mkDerivation (finalAttrs: { pname = "juce"; - version = "8.0.3"; + version = "8.0.4"; src = fetchFromGitHub { owner = "juce-framework"; repo = "juce"; rev = finalAttrs.version; - hash = "sha256-faD1iI9cQ2v3YisbMDtk2lRELR7eDTz3JP0K0p1vmEU="; + 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 = [ diff --git a/pkgs/development/misc/juce/juce-8.0.4-cmake_install.patch b/pkgs/development/misc/juce/juce-8.0.4-cmake_install.patch new file mode 100644 index 0000000000000..74f60ef75a64d --- /dev/null +++ b/pkgs/development/misc/juce/juce-8.0.4-cmake_install.patch @@ -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