From aafc60e4c2526e56e642768c6dc62617e17f7421 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 9 Oct 2022 12:45:44 +0200 Subject: [PATCH 1/2] audacity: 3.1.3 -> 3.2.1 --- pkgs/applications/audio/audacity/default.nix | 82 +++++++++++--------- pkgs/top-level/all-packages.nix | 16 ++-- 2 files changed, 50 insertions(+), 48 deletions(-) diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 953e9887f5a6..f4846308144c 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -13,6 +13,7 @@ , libjack2 , lv2 , lilv +, mpg123 , serd , sord , sqlite @@ -45,18 +46,17 @@ , libsepol , libxkbcommon , util-linux -, wxGTK +, wavpack +, wxGTK31 , libpng , libjpeg -, AppKit ? null -, AudioToolbox ? null -, AudioUnit ? null -, Carbon ? null -, Cocoa ? null -, CoreAudio ? null -, CoreAudioKit ? null -, CoreServices ? null -, wxmac +, AppKit +, AudioToolbox +, AudioUnit +, Carbon +, CoreAudio +, CoreAudioKit +, CoreServices }: # TODO @@ -66,31 +66,28 @@ let inherit (lib) optionals; pname = "audacity"; - version = "3.1.3"; + version = "3.2.1"; - wxWidgets_src = fetchFromGitHub { - owner = pname; - repo = "wxWidgets"; - rev = "v${version}-${pname}"; - sha256 = "sha256-KrmYYv23DHBYKIuxMYBioCQ2e4KWdgmuREnimtm0XNU="; - fetchSubmodules = true; - }; - - wxGTK' = wxGTK.overrideAttrs (oldAttrs: rec { - src = wxWidgets_src; + wxGTK' = if stdenv.isDarwin then wxGTK31 else + wxGTK31.overrideAttrs (oldAttrs: rec { + version = "3.1.3.1-${pname}"; + src = fetchFromGitHub { + owner = pname; + repo = "wxWidgets"; + rev = "v${version}"; + sha256 = "sha256-1gO86/uIoo97v2KzJ7iz/hou6Fji3RkL9fM23DWyg/w="; + fetchSubmodules = true; + }; }); - - wxmac' = wxmac.overrideAttrs (oldAttrs: rec { - src = wxWidgets_src; - }); -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { inherit pname version; src = fetchFromGitHub { owner = pname; repo = pname; rev = "Audacity-${version}"; - sha256 = "sha256-sdI4paxIHDZgoWTCekjrkFR4JFpQC6OatcnJdVXCCZk="; + sha256 = "sha256-7rfttp9LnfM2LBT5seupPyDckS7LEzWDZoqtLsGgqgI="; }; postPatch = '' @@ -105,9 +102,9 @@ in stdenv.mkDerivation rec { gettext pkg-config python3 + makeWrapper ] ++ optionals stdenv.isLinux [ linuxHeaders - makeWrapper ]; buildInputs = [ @@ -125,6 +122,7 @@ in stdenv.mkDerivation rec { libvorbis lilv lv2 + mpg123 pcre portmidi serd @@ -136,6 +134,9 @@ in stdenv.mkDerivation rec { suil twolame portaudio + wavpack + wxGTK' + wxGTK'.gtk ] ++ optionals stdenv.isLinux [ alsa-lib # for portaudio at-spi2-core @@ -149,12 +150,8 @@ in stdenv.mkDerivation rec { libsepol libuuid util-linux - wxGTK' - wxGTK'.gtk ] ++ optionals stdenv.isDarwin [ - wxmac' AppKit - Cocoa CoreAudioKit AudioUnit AudioToolbox CoreAudio CoreServices Carbon # for portaudio libpng @@ -167,22 +164,33 @@ in stdenv.mkDerivation rec { "-DDISABLE_DYNAMIC_LOADING_FFMPEG=ON" "-Daudacity_conan_enabled=Off" "-Daudacity_use_ffmpeg=loaded" + "-Daudacity_has_vst3=Off" # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/ "-DCMAKE_SKIP_BUILD_RPATH=ON" ]; + # [ 57%] Generating LightThemeAsCeeCode.h... + # ../../utils/image-compiler: error while loading shared libraries: + # lib-theme.so: cannot open shared object file: No such file or directory + preBuild = '' + export LD_LIBRARY_PATH=$PWD/utils + ''; + doCheck = false; # Test fails # Replace audacity's wrapper, to: # - put it in the right place, it shouldn't be in "$out/audacity" # - Add the ffmpeg dynamic dependency postInstall = lib.optionalString stdenv.isLinux '' - rm "$out/audacity" wrapProgram "$out/bin/audacity" \ --prefix LD_LIBRARY_PATH : "$out/lib/audacity":${lib.makeLibraryPath [ ffmpeg_4 ]} \ --suffix AUDACITY_MODULES_PATH : "$out/lib/audacity/modules" \ --suffix AUDACITY_PATH : "$out/share/audacity" + '' + lib.optionalString stdenv.isDarwin '' + mkdir -p $out/{Applications,bin} + mv $out/Audacity.app $out/Applications/ + makeWrapper $out/Applications/Audacity.app/Contents/MacOS/Audacity $out/bin/audacity ''; meta = with lib; { @@ -198,11 +206,9 @@ in stdenv.mkDerivation rec { # Documentation. cc-by-30 ]; - maintainers = with maintainers; [ lheckemann veprbl ]; + maintainers = with maintainers; [ lheckemann veprbl wegank ]; platforms = platforms.unix; - # darwin-aarch due to qtbase broken for it. - # darwin-x86_64 due to - # https://logs.nix.ci/?attempt_id=5cbc4581-09b4-4148-82fe-0326411a56b3&key=nixos%2Fnixpkgs.152273. - broken = stdenv.isDarwin; + # error: unknown type name 'NSAppearanceName' + broken = stdenv.isDarwin && stdenv.isx86_64; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b51c0bbbe3d0..f93e83bdfea6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26914,16 +26914,12 @@ with pkgs; }; audaciousQt5 = audacious; - audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk2; }; - audacity-gtk3 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk3; }; - audacity = - if stdenv.isDarwin then - callPackage ../applications/audio/audacity { - inherit (darwin.apple_sdk.frameworks) AppKit AudioToolbox AudioUnit Carbon Cocoa CoreAudio CoreAudioKit CoreServices; - suil = suil-qt5; - } - else - audacity-gtk2; + audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK31 = wxGTK31-gtk2; }; + audacity-gtk3 = callPackage ../applications/audio/audacity { wxGTK31 = wxGTK31-gtk3; }; + audacity = callPackage ../applications/audio/audacity { + inherit (darwin.apple_sdk.frameworks) AppKit AudioToolbox AudioUnit Carbon CoreAudio CoreAudioKit CoreServices; + suil = suil-qt5; + }; audio-recorder = callPackage ../applications/audio/audio-recorder { }; From 4836d085e453cb460afa16d26da9057f45513852 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 9 Oct 2022 12:46:50 +0200 Subject: [PATCH 2/2] audacity: deprecate wxGTK31 and gtk2 --- pkgs/applications/audio/audacity/default.nix | 22 +++++--------------- pkgs/top-level/aliases.nix | 2 ++ pkgs/top-level/all-packages.nix | 2 -- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index f4846308144c..733368c115c4 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -47,7 +47,8 @@ , libxkbcommon , util-linux , wavpack -, wxGTK31 +, wxGTK32 +, gtk3 , libpng , libjpeg , AppKit @@ -60,25 +61,12 @@ }: # TODO -# 1. as of 3.0.2, GTK2 is still the recommended version ref https://www.audacityteam.org/download/source/ check if that changes in future versions -# 2. detach sbsms +# 1. detach sbsms let inherit (lib) optionals; pname = "audacity"; version = "3.2.1"; - - wxGTK' = if stdenv.isDarwin then wxGTK31 else - wxGTK31.overrideAttrs (oldAttrs: rec { - version = "3.1.3.1-${pname}"; - src = fetchFromGitHub { - owner = pname; - repo = "wxWidgets"; - rev = "v${version}"; - sha256 = "sha256-1gO86/uIoo97v2KzJ7iz/hou6Fji3RkL9fM23DWyg/w="; - fetchSubmodules = true; - }; - }); in stdenv.mkDerivation rec { inherit pname version; @@ -112,6 +100,7 @@ stdenv.mkDerivation rec { ffmpeg_4 file flac + gtk3 lame libid3tag libjack2 @@ -135,8 +124,7 @@ stdenv.mkDerivation rec { twolame portaudio wavpack - wxGTK' - wxGTK'.gtk + wxGTK32 ] ++ optionals stdenv.isLinux [ alsa-lib # for portaudio at-spi2-core diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 9cad7bdda5cd..2ef122ba137d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -87,6 +87,8 @@ mapAliases ({ asterisk_17 = throw "asterisk_17: Asterisk 17 is end of life and has been removed"; # Added 2022-04-06 at_spi2_atk = throw "'at_spi2_atk' has been renamed to/replaced by 'at-spi2-atk'"; # Converted to throw 2022-02-22 at_spi2_core = throw "'at_spi2_core' has been renamed to/replaced by 'at-spi2-core'"; # Converted to throw 2022-02-22 + audacity-gtk2 = throw "'audacity-gtk2' has been removed to/replaced by 'audacity'"; # Added 2022-10-09 + audacity-gtk3 = throw "'audacity-gtk3' has been removed to/replaced by 'audacity'"; # Added 2022-10-09 automoc4 = throw "automoc4 has been removed from nixpkgs"; # Added 2022-05-30 avldrums-lv2 = throw "'avldrums-lv2' has been renamed to/replaced by 'x42-avldrums'"; # Converted to throw 2022-09-24 awesome-4-0 = awesome; # Added 2022-05-05 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f93e83bdfea6..32a9eef7a115 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26914,8 +26914,6 @@ with pkgs; }; audaciousQt5 = audacious; - audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK31 = wxGTK31-gtk2; }; - audacity-gtk3 = callPackage ../applications/audio/audacity { wxGTK31 = wxGTK31-gtk3; }; audacity = callPackage ../applications/audio/audacity { inherit (darwin.apple_sdk.frameworks) AppKit AudioToolbox AudioUnit Carbon CoreAudio CoreAudioKit CoreServices; suil = suil-qt5;