Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d3afdf90dbb2
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 249db9f8a74e
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jan 16, 2021

  1. audacity: 2.4.1 -> 2.4.2

    A few other things:
     - prep for transition to gtk3 when audacity recommends it
     - we drop the runtime linking with lame as audacity is picking it up on
       its own
     - on linux, add a number of missing dependencies.
     - use a newer (recommended) wxwidgets
     - add a patch (merged upstream) that makes audacity follow XDG for file locations
    peterhoeg committed Jan 16, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    acdlite Andrew Clark
    Copy the full SHA
    249db9f View commit details
Showing with 105 additions and 21 deletions.
  1. +102 −20 pkgs/applications/audio/audacity/default.nix
  2. +3 −1 pkgs/top-level/all-packages.nix
122 changes: 102 additions & 20 deletions pkgs/applications/audio/audacity/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,79 @@
{ lib, stdenv, fetchzip, wxGTK30, pkgconfig, file, gettext,
libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame,
expat, libid3tag, ffmpeg_3, soundtouch, /*, portaudio - given up fighting their portaudio.patch */
cmake
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, wxGTK
, pkg-config
, python3
, gettext
, file
, libvorbis
, libmad
, libjack2
, lv2
, lilv
, serd
, sord
, sratom
, suil
, alsaLib
, libsndfile
, soxr
, flac
, twolame
, expat
, libid3tag
, libopus
, ffmpeg
, soundtouch
, pcre /*, portaudio - given up fighting their portaudio.patch */
, at-spi2-core ? null
, dbus ? null
, epoxy ? null
, libXdmcp ? null
, libXtst ? null
, libpthreadstubs ? null
, libselinux ? null
, libsepol ? null
, libxkbcommon ? null
, utillinux ? null
}:

with stdenv.lib;
# TODO
# - as of 2.4.2, GTK2 is still the recommended version ref https://www.audacityteam.org/download/source/ check if that changes in future versions
# - detach sbsms

stdenv.mkDerivation rec {
version = "2.4.1";
pname = "audacity";
version = "2.4.2";

src = fetchzip {
url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz";
sha256 = "1xk0piv72d2xd3p7igr916fhcbrm76fhjr418k1rlqdzzg1hfljn";
src = fetchFromGitHub {
owner = "audacity";
repo = "audacity";
rev = "Audacity-${version}";
sha256 = "sha256-hpRTo5B0EMyzORopsNPOgv6mohBkwJfWfCLnPvFmdFI=";
};

cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
patches = [
(fetchpatch {
url = "https://github.com/audacity/audacity/commit/a070b5d8a8ba10fb86edba6aeb8fdab0f66ba408.patch";
sha256 = "sha256-8UZupGcN+/tytAhyy5T1P0nufvsQPeyLgOUMGt7l8Oc=";
name = "audacity_xdg_paths.patch";
})
];

# audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually
# this file *should* be generated by cmake but as of 2.4.2 isn't yet
postPatch = ''
touch src/RevisionIdent.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 [
# LAME
"-lmp3lame"
# ffmpeg
"-lavcodec"
"-lavdevice"
@@ -35,14 +86,45 @@ stdenv.mkDerivation rec {
"-lswscale"
];

nativeBuildInputs = [ pkgconfig cmake ];
nativeBuildInputs = [ cmake gettext pkg-config python3 ];

buildInputs = [
file gettext wxGTK30 expat alsaLib
libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil wxGTK30.gtk
ffmpeg_3 libmad lame libvorbis flac soundtouch
]; #ToDo: detach sbsms
alsaLib
expat
ffmpeg
file
flac
libid3tag
libjack2
libmad
libopus
libsndfile
libvorbis
lilv
lv2
pcre
serd
sord
soundtouch
soxr
sratom
suil
twolame
wxGTK
wxGTK.gtk
] ++ lib.optionals stdenv.isLinux [
at-spi2-core
dbus
epoxy
libXdmcp
libXtst
libpthreadstubs
libxkbcommon
libselinux
libsepol
utillinux
];

dontDisableStatic = true;
doCheck = false; # Test fails

meta = with lib; {
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -21054,7 +21054,9 @@ in
audacious = libsForQt5.callPackage ../applications/audio/audacious { };
audaciousQt5 = audacious;

audacity = callPackage ../applications/audio/audacity { };
audacity-gtk2 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk2; };
audacity-gtk3 = callPackage ../applications/audio/audacity { wxGTK = wxGTK31-gtk3; };
audacity = audacity-gtk2;

audio-recorder = callPackage ../applications/audio/audio-recorder { };