audacity: switch to tenacity because audacity is broken on master

This commit is contained in:
2025-07-28 02:20:14 +00:00
parent b08ab26ea1
commit 74f59eb596

View File

@@ -4,25 +4,31 @@
# - Audio Setup -> Rescan Audio Devices ... # - Audio Setup -> Rescan Audio Devices ...
# - Audio Setup -> Recording device -> sysdefault # - Audio Setup -> Recording device -> sysdefault
{ lib, pkgs, ... }: { lib, pkgs, ... }:
{ let
sane.programs.audacity = {
packageUnwrapped = (pkgs.audacity.override {
# wxGTK32 uses webkitgtk-4.0. # wxGTK32 uses webkitgtk-4.0.
# audacity doesn't actually need webkit though, so diable to reduce closure # audacity doesn't actually need webkit though, so diable to reduce closure
wxGTK32 = pkgs.wxGTK32.override { wxGTK32 = pkgs.wxGTK32.override {
withWebKit = false; withWebKit = false;
}; };
}).overrideAttrs (base: { # basePkg = pkgs.audacity.overrideAttrs (base: {
# upstream audacity.desktop specifies GDK_BACKEND=x11, with which it doesn't actually launch :| # # upstream audacity.desktop specifies GDK_BACKEND=x11, with which it doesn't actually launch :|
postInstall = (base.postInstall or "") + '' # postInstall = (base.postInstall or "") + ''
substituteInPlace $out/share/applications/audacity.desktop \ # substituteInPlace $out/share/applications/${appId}.desktop \
--replace-fail 'GDK_BACKEND=x11 ' "" # --replace-fail 'GDK_BACKEND=x11 ' ""
''; # '';
# XXX(2025-03-03): upstream nixpkgs incorrectly defaults `GDK_BACKEND=x11`, # # XXX(2025-03-03): upstream nixpkgs incorrectly defaults `GDK_BACKEND=x11`,
# even though audacity runs fine on wayland # # even though audacity runs fine on wayland
postFixup = lib.replaceStrings [ "--set-default GDK_BACKEND x11" ] [ "" ] base.postFixup; # postFixup = lib.replaceStrings [ "--set-default GDK_BACKEND x11" ] [ "" ] base.postFixup;
}); # });
basePkg = pkgs.tenacity; #< XXX(2025-07-27): upstream audacity fails build; use tenacity until fixed
appId = basePkg.pname;
in
{
sane.programs.audacity = {
packageUnwrapped = basePkg.override {
inherit wxGTK32;
};
buildCost = 1; buildCost = 1;
@@ -34,20 +40,21 @@
"tmp" "tmp"
"Music" "Music"
# audacity needs the entire config dir mounted if running in a sandbox # audacity needs the entire config dir mounted if running in a sandbox
".config/audacity" ".config/${appId}"
]; ];
sandbox.extraPaths = [ sandbox.extraPaths = [
"/dev/snd" # for recording audio inputs to work "/dev/snd" # for recording audio inputs to work
]; ];
# disable first-run splash screen # disable first-run splash screen
fs.".config/audacity/audacity.cfg".file.text = '' fs.".config/${appId}/${appId}.cfg".file.text = ''
PrefsVersion=1.1.1r1 PrefsVersion=1.1.1r1
[GUI] [GUI]
ShowSplashScreen=0 ShowSplashScreen=0
[Version] [Version]
Major=3 Major=${lib.versions.major basePkg.version}
Minor=4 Minor=${lib.versions.minor basePkg.version}
Micro=${lib.versions.patch basePkg.version}
''; '';
}; };
} }