diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/applications/audio/audacity/default.nix | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/audacity/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/audio/audacity/default.nix | 96 |
1 files changed, 61 insertions, 35 deletions
diff --git a/nixpkgs/pkgs/applications/audio/audacity/default.nix b/nixpkgs/pkgs/applications/audio/audacity/default.nix index 9d4c522edc1a..953e9887f5a6 100644 --- a/nixpkgs/pkgs/applications/audio/audacity/default.nix +++ b/nixpkgs/pkgs/applications/audio/audacity/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , fetchpatch , cmake +, makeWrapper , pkg-config , python3 , gettext @@ -20,14 +21,17 @@ , libsndfile , soxr , flac +, lame , twolame , expat , libid3tag , libopus +, libuuid , ffmpeg_4 , soundtouch , pcre -/*, portaudio - given up fighting their portaudio.patch */ +, portaudio # given up fighting their portaudio.patch? +, portmidi , linuxHeaders , alsa-lib , at-spi2-core @@ -36,11 +40,14 @@ , libXdmcp , libXtst , libpthreadstubs +, libsbsms_2_3_0 , libselinux , libsepol , libxkbcommon , util-linux , wxGTK +, libpng +, libjpeg , AppKit ? null , AudioToolbox ? null , AudioUnit ? null @@ -58,12 +65,14 @@ let inherit (lib) optionals; + pname = "audacity"; + version = "3.1.3"; wxWidgets_src = fetchFromGitHub { - owner = "audacity"; + owner = pname; repo = "wxWidgets"; - rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985"; - sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a"; + rev = "v${version}-${pname}"; + sha256 = "sha256-KrmYYv23DHBYKIuxMYBioCQ2e4KWdgmuREnimtm0XNU="; fetchSubmodules = true; }; @@ -74,41 +83,20 @@ let wxmac' = wxmac.overrideAttrs (oldAttrs: rec { src = wxWidgets_src; }); - -in -stdenv.mkDerivation rec { - pname = "audacity"; - # nixpkgs-update: no auto update - # Humans too! Let's wait to see how the situation with - # https://github.com/audacity/audacity/issues/1213 develops before - # pulling any updates that are subject to this privacy policy. We - # may wish to switch to a fork, but at the time of writing - # (2021-07-05) it's too early to tell how well any of the forks will - # be maintained. - version = "3.0.2"; +in stdenv.mkDerivation rec { + inherit pname version; src = fetchFromGitHub { - owner = "audacity"; - repo = "audacity"; + owner = pname; + repo = pname; rev = "Audacity-${version}"; - sha256 = "035qq2ff16cdl2cb9iply2bfjmhfl1dpscg79x6c9l0i9m8k41zj"; + sha256 = "sha256-sdI4paxIHDZgoWTCekjrkFR4JFpQC6OatcnJdVXCCZk="; }; - patches = [ - (fetchpatch { - url = "https://github.com/audacity/audacity/commit/7f8135e112a0e1e8e906abab9339680d1e491441.patch"; - sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw"; - name = "audacity_xdg_paths.patch"; - }) - # This is required to make audacity work with nixpkgs’ sqlite - # https://github.com/audacity/audacity/pull/1802 rebased onto 3.0.2 - ./0001-Use-a-different-approach-to-estimate-the-disk-space-.patch - ]; - postPatch = '' - touch src/RevisionIdent.h + mkdir src/private '' + lib.optionalString stdenv.isLinux '' - substituteInPlace src/FileNames.cpp \ + substituteInPlace libraries/lib-files/FileNames.cpp \ --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h ''; @@ -119,6 +107,7 @@ stdenv.mkDerivation rec { python3 ] ++ optionals stdenv.isLinux [ linuxHeaders + makeWrapper ]; buildInputs = [ @@ -126,15 +115,18 @@ stdenv.mkDerivation rec { ffmpeg_4 file flac + lame libid3tag libjack2 libmad libopus + libsbsms_2_3_0 libsndfile libvorbis lilv lv2 pcre + portmidi serd sord soundtouch @@ -143,6 +135,7 @@ stdenv.mkDerivation rec { sratom suil twolame + portaudio ] ++ optionals stdenv.isLinux [ alsa-lib # for portaudio at-spi2-core @@ -154,6 +147,7 @@ stdenv.mkDerivation rec { libxkbcommon libselinux libsepol + libuuid util-linux wxGTK' wxGTK'.gtk @@ -163,20 +157,52 @@ stdenv.mkDerivation rec { Cocoa CoreAudioKit AudioUnit AudioToolbox CoreAudio CoreServices Carbon # for portaudio + libpng + libjpeg ]; cmakeFlags = [ - "-Daudacity_use_ffmpeg=linked" + "-DAUDACITY_REV_LONG=nixpkgs" + "-DAUDACITY_REV_TIME=nixpkgs" "-DDISABLE_DYNAMIC_LOADING_FFMPEG=ON" + "-Daudacity_conan_enabled=Off" + "-Daudacity_use_ffmpeg=loaded" + + # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/ + "-DCMAKE_SKIP_BUILD_RPATH=ON" ]; 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" + ''; + meta = with lib; { description = "Sound editor with graphical UI"; - homepage = "https://www.audacityteam.org/"; - license = licenses.gpl2Plus; + homepage = "https://www.audacityteam.org"; + changelog = "https://github.com/audacity/audacity/releases"; + license = with licenses; [ + gpl2Plus + # Must be GPL3 when building with "technologies that require it, + # such as the VST3 audio plugin interface". + # https://github.com/audacity/audacity/discussions/2142. + gpl3 + # Documentation. + cc-by-30 + ]; maintainers = with maintainers; [ lheckemann veprbl ]; 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; }; } |