From ac3c81faa193bc380e0756660897f44723c04f4a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 31 Dec 2022 17:35:31 +0100 Subject: [PATCH 1/2] darwin.apple_sdk: expose MultitouchSupport --- .../darwin/apple-sdk-11.0/private-frameworks.nix | 3 +++ pkgs/os-specific/darwin/apple-sdk/default.nix | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix b/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix index 4d9f68c0d35f..84ca7c42301b 100644 --- a/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk-11.0/private-frameworks.nix @@ -21,4 +21,7 @@ # Also expose DebugSymbols; used by `llvmPackages_8.lldb` package. DebugSymbols = {}; + + # Also expose MultitouchSupport; used by `chuck` package. + MultitouchSupport = {}; } diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 376cc731639d..7cc9e293f725 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -326,7 +326,16 @@ in rec { "Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd" ]; }); - } // lib.genAttrs [ "ContactsPersistence" "CoreSymbolication" "DebugSymbols" "GameCenter" "SkyLight" "UIFoundation" ] (x: tbdOnlyFramework x {}); + } // lib.genAttrs [ + "ContactsPersistence" + "CoreSymbolication" + "DebugSymbols" + "GameCenter" + "MultitouchSupport" + "SkyLight" + "UIFoundation" + ] + (x: tbdOnlyFramework x {}); bareFrameworks = lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs; From d5fc6aaca67ec8251bce754a2fc55f4e16faf89b Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 31 Dec 2022 17:37:43 +0100 Subject: [PATCH 2/2] chuck: 1.4.1.0 -> 1.4.1.1 --- pkgs/applications/audio/chuck/default.nix | 26 +++++++---------------- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix index 50a276074cab..bb0e885cd746 100644 --- a/pkgs/applications/audio/chuck/default.nix +++ b/pkgs/applications/audio/chuck/default.nix @@ -1,35 +1,27 @@ -{ stdenv, lib, fetchurl, alsa-lib, bison, flex, libsndfile, which -, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel +{ stdenv, lib, fetchurl, alsa-lib, bison, flex, libsndfile, which, DarwinTools, xcbuild +, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel, MultitouchSupport }: stdenv.mkDerivation rec { - version = "1.4.1.0"; + version = "1.4.1.1"; pname = "chuck"; src = fetchurl { url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz"; - sha256 = "sha256-dL+ZrVFeMRPFW4MxUpNvrQKjzwBqVBBf8Rd3xHMZSSg="; + sha256 = "sha256-RFnubxUdpy3N4VJeCv4FMp1hCGNWsWjs/AvDpXApD2M="; }; - nativeBuildInputs = [ flex bison which ]; + nativeBuildInputs = [ flex bison which ] + ++ lib.optionals stdenv.isDarwin [ DarwinTools xcbuild ]; buildInputs = [ libsndfile ] ++ lib.optional (!stdenv.isDarwin) alsa-lib - ++ lib.optionals stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ]; + ++ lib.optionals stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel MultitouchSupport ]; patches = [ ./darwin-limits.patch ]; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot"; - NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework MultitouchSupport"; - - postPatch = '' - substituteInPlace src/core/makefile.x/makefile.osx \ - --replace "weak_framework" "framework" \ - --replace "MACOSX_DEPLOYMENT_TARGET=10.9" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET" - ''; - makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ]; - buildFlags = [ (if stdenv.isDarwin then "osx" else "linux-alsa") ]; + buildFlags = [ (if stdenv.isDarwin then "mac" else "linux-alsa") ]; meta = with lib; { description = "Programming language for real-time sound synthesis and music creation"; @@ -37,7 +29,5 @@ stdenv.mkDerivation rec { license = licenses.gpl2; platforms = platforms.unix; maintainers = with maintainers; [ ftrvxmtrx ]; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 104f8eef991a..e4f6842db23b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28119,7 +28119,8 @@ with pkgs; chromiumDev = lowPrio (chromium.override { channel = "dev"; }); chuck = callPackage ../applications/audio/chuck { - inherit (darwin.apple_sdk.frameworks) AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel; + inherit (darwin) DarwinTools; + inherit (darwin.apple_sdk.frameworks) AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel MultitouchSupport; }; cinelerra = callPackage ../applications/video/cinelerra { };