nixpkgs/pkgs/applications/audio/tenacity/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

160 lines
2.7 KiB
Nix
Raw Normal View History

2021-11-01 07:35:37 +00:00
{ stdenv
, lib
, fetchFromGitea
, fetchpatch
2021-11-01 07:35:37 +00:00
, cmake
, wxGTK32
2022-10-27 13:30:15 +00:00
, gtk3
2021-11-01 07:35:37 +00:00
, 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_5
2021-11-01 07:35:37 +00:00
, soundtouch
, pcre
, portaudio
, linuxHeaders
, at-spi2-core
, dbus
, libepoxy
2021-11-01 07:35:37 +00:00
, libXdmcp
, libXtst
, libpthreadstubs
, libselinux
, libsepol
, libxkbcommon
, util-linux
}:
stdenv.mkDerivation rec {
pname = "tenacity";
2023-11-13 13:53:46 +00:00
version = "1.3.3";
2021-11-01 07:35:37 +00:00
src = fetchFromGitea {
domain = "codeberg.org";
owner = "tenacityteam";
repo = pname;
2023-10-15 20:53:19 +00:00
fetchSubmodules = true;
rev = "v${version}";
2023-11-13 13:53:46 +00:00
hash = "sha256-UU3iKfab6en4IyGlpNLUhOil3snzaZ2nI6JMqoL6DUs=";
2021-11-01 07:35:37 +00:00
};
postPatch = ''
mkdir -p build/src/private
touch build/src/private/RevisionIdent.h
2021-11-01 07:35:37 +00:00
substituteInPlace libraries/lib-files/FileNames.cpp \
--replace /usr/include/linux/magic.h \
${linuxHeaders}/include/linux/magic.h
2021-11-01 07:35:37 +00:00
'';
postFixup = ''
2023-07-19 02:15:56 +00:00
rm $out/tenacity
2021-11-01 07:35:37 +00:00
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=\"\"";
2021-11-01 07:35:37 +00:00
# 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.isLinux [
linuxHeaders
];
buildInputs = [
alsa-lib
expat
ffmpeg_5
2021-11-01 07:35:37 +00:00
file
flac
glib
lame
libid3tag
libjack2
libmad
libopus
libsndfile
libvorbis
lilv
lv2
pcre
portaudio
serd
sord
soundtouch
soxr
sqlite
sratom
suil
twolame
wxGTK32
2022-10-27 13:30:15 +00:00
gtk3
2021-11-01 07:35:37 +00:00
] ++ lib.optionals stdenv.isLinux [
at-spi2-core
dbus
libepoxy
2021-11-01 07:35:37 +00:00
libXdmcp
libXtst
libpthreadstubs
libxkbcommon
libselinux
libsepol
util-linux
];
2022-07-17 14:42:15 +00:00
cmakeFlags = [
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
2021-11-01 07:35:37 +00:00
meta = with lib; {
description = "Sound editor with graphical UI";
mainProgram = "tenacity";
2021-11-01 07:35:37 +00:00
homepage = "https://tenacityaudio.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ irenes lheckemann ];
platforms = platforms.linux;
};
}