From 0b973eaa9441f894c65e5008a042b21025f6ff44 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 5 May 2021 19:04:07 +0800 Subject: audacity-gtk3: re-introduce at 3.0.2 --- pkgs/applications/audio/audacity/default.nix | 52 +++++++++++++--------------- 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'pkgs/applications/audio/audacity') diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 1a47451ad76..0fee289021e 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -30,24 +30,26 @@ , soundtouch , pcre /*, portaudio - given up fighting their portaudio.patch */ , linuxHeaders -, at-spi2-core ? null -, dbus ? null -, epoxy ? null -, libXdmcp ? null -, libXtst ? null -, libpthreadstubs ? null -, libselinux ? null -, libsepol ? null -, libxkbcommon ? null -, utillinux ? null +, at-spi2-core +, dbus +, epoxy +, libXdmcp +, libXtst +, libpthreadstubs +, libselinux +, libsepol +, libxkbcommon +, util-linux }: # TODO -# - 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 -# - detach sbsms +# 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 let - wxGTK-audacity = wxGTK.overrideAttrs (oldAttrs: rec { + inherit (lib) optionals; + + wxGTK' = wxGTK.overrideAttrs (oldAttrs: rec { src = fetchFromGitHub { owner = "audacity"; repo = "wxWidgets"; @@ -56,6 +58,7 @@ let fetchSubmodules = true; }; }); + in stdenv.mkDerivation rec { pname = "audacity"; @@ -70,28 +73,21 @@ stdenv.mkDerivation rec { patches = [ (fetchpatch { - url = "https://github.com/audacity/audacity/commit/007852e51fcbb5f1f359d112f28b8984a604dac6.patch"; + url = "https://github.com/audacity/audacity/pull/831/commits/007852e51fcbb5f1f359d112f28b8984a604dac6.patch"; sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw"; name = "audacity_xdg_paths.patch"; }) ]; - # this file *should* be generated by cmake but as of 2.4.2 isn't yet postPatch = '' touch src/RevisionIdent.h - ''; - preConfigure = '' - substituteInPlace src/FileNames.cpp --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h + substituteInPlace src/FileNames.cpp \ + --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h ''; - # workaround for a broken cmake. Drop it with a later version to see if it works. - # https://github.com/NixOS/nixpkgs/issues/94905 - cmakeFlags = lib.optional stdenv.isLinux "-DCMAKE_OSX_ARCHITECTURES="; - # audacity only looks for ffmpeg at runtime, so we need to link it in manually NIX_LDFLAGS = toString [ - # ffmpeg "-lavcodec" "-lavdevice" "-lavfilter" @@ -108,7 +104,7 @@ stdenv.mkDerivation rec { gettext pkg-config python3 - ] ++ lib.optionals stdenv.isLinux [ + ] ++ optionals stdenv.isLinux [ linuxHeaders ]; @@ -135,9 +131,9 @@ stdenv.mkDerivation rec { sratom suil twolame - wxGTK-audacity - wxGTK-audacity.gtk - ] ++ lib.optionals stdenv.isLinux [ + wxGTK' + wxGTK'.gtk + ] ++ optionals stdenv.isLinux [ at-spi2-core dbus epoxy @@ -147,7 +143,7 @@ stdenv.mkDerivation rec { libxkbcommon libselinux libsepol - utillinux + util-linux ]; doCheck = false; # Test fails -- cgit 1.4.1