summary refs log tree commit diff
path: root/pkgs/applications/audio/audacity
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2021-05-05 19:04:07 +0800
committerPeter Hoeg <peter@hoeg.com>2021-05-10 17:38:37 +0800
commit0b973eaa9441f894c65e5008a042b21025f6ff44 (patch)
treec787eb088c255c4a5ace9cac5cd8bbd8d2b86845 /pkgs/applications/audio/audacity
parent3531b9c8701c1610e4f4ad5c1b26cd842124c8c8 (diff)
downloadnixpkgs-0b973eaa9441f894c65e5008a042b21025f6ff44.tar
nixpkgs-0b973eaa9441f894c65e5008a042b21025f6ff44.tar.gz
nixpkgs-0b973eaa9441f894c65e5008a042b21025f6ff44.tar.bz2
nixpkgs-0b973eaa9441f894c65e5008a042b21025f6ff44.tar.lz
nixpkgs-0b973eaa9441f894c65e5008a042b21025f6ff44.tar.xz
nixpkgs-0b973eaa9441f894c65e5008a042b21025f6ff44.tar.zst
nixpkgs-0b973eaa9441f894c65e5008a042b21025f6ff44.zip
audacity-gtk3: re-introduce at 3.0.2
Diffstat (limited to 'pkgs/applications/audio/audacity')
-rw-r--r--pkgs/applications/audio/audacity/default.nix52
1 files changed, 24 insertions, 28 deletions
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