nixpkgs/pkgs/by-name/te/tenacity/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

164 lines
2.8 KiB
Nix

{
stdenv,
lib,
fetchFromGitea,
cmake,
wxGTK32,
gtk3,
pkg-config,
python3,
gettext,
glib,
file,
lame,
libvorbis,
libmad,
libjack2,
lv2,
lilv,
makeWrapper,
serd,
sord,
sqlite,
sratom,
suil,
alsa-lib,
libsndfile,
soxr,
flac,
twolame,
expat,
libid3tag,
libopus,
ffmpeg,
soundtouch,
pcre,
portaudio,
linuxHeaders,
at-spi2-core,
dbus,
libepoxy,
libXdmcp,
libXtst,
libpthreadstubs,
libselinux,
libsepol,
libxkbcommon,
util-linux,
}:
stdenv.mkDerivation rec {
pname = "tenacity";
version = "1.3.3";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "tenacityteam";
repo = pname;
fetchSubmodules = true;
rev = "v${version}";
hash = "sha256-UU3iKfab6en4IyGlpNLUhOil3snzaZ2nI6JMqoL6DUs=";
};
postPatch = ''
mkdir -p build/src/private
touch build/src/private/RevisionIdent.h
substituteInPlace libraries/lib-files/FileNames.cpp \
--replace /usr/include/linux/magic.h \
${linuxHeaders}/include/linux/magic.h
'';
postFixup = ''
rm $out/tenacity
wrapProgram "$out/bin/tenacity" \
--suffix AUDACITY_PATH : "$out/share/tenacity" \
--suffix AUDACITY_MODULES_PATH : "$out/lib/tenacity/modules" \
--prefix LD_LIBRARY_PATH : "$out/lib/tenacity" \
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
'';
env.NIX_CFLAGS_COMPILE = "-D GIT_DESCRIBE=\"\"";
# tenacity only looks for ffmpeg at runtime, so we need to link it in manually
NIX_LDFLAGS = toString [
"-lavcodec"
"-lavdevice"
"-lavfilter"
"-lavformat"
"-lavutil"
"-lpostproc"
"-lswresample"
"-lswscale"
];
nativeBuildInputs =
[
cmake
gettext
makeWrapper
pkg-config
python3
]
++ lib.optionals stdenv.hostPlatform.isLinux [
linuxHeaders
];
buildInputs =
[
alsa-lib
expat
ffmpeg
file
flac
glib
lame
libid3tag
libjack2
libmad
libopus
libsndfile
libvorbis
lilv
lv2
pcre
portaudio
serd
sord
soundtouch
soxr
sqlite
sratom
suil
twolame
wxGTK32
gtk3
]
++ lib.optionals stdenv.hostPlatform.isLinux [
at-spi2-core
dbus
libepoxy
libXdmcp
libXtst
libpthreadstubs
libxkbcommon
libselinux
libsepol
util-linux
];
cmakeFlags = [
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
meta = with lib; {
description = "Sound editor with graphical UI";
mainProgram = "tenacity";
homepage = "https://tenacityaudio.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ irenes ];
platforms = platforms.linux;
};
}