3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/audio/soundkonverter/default.nix

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

107 lines
3.9 KiB
Nix
Raw Normal View History

2019-02-20 19:40:22 +00:00
# currently needs to be installed into an environment and needs a `kbuildsycoca5` run afterwards for plugin discovery
{
mkDerivation, fetchFromGitHub, fetchpatch, lib, makeWrapper,
cmake, extra-cmake-modules, pkg-config,
2019-02-20 19:40:22 +00:00
libkcddb, kconfig, kconfigwidgets, ki18n, kdelibs4support, kio, solid, kwidgetsaddons, kxmlgui,
qtbase, phonon,
2019-02-20 19:40:22 +00:00
taglib,
# optional backends
withCD ? true, cdparanoia,
withFlac ? true, flac,
withMidi ? true, fluidsynth, timidity,
withSpeex ? false, speex,
withVorbis ? true, vorbis-tools, vorbisgain,
withMp3 ? true, lame, mp3gain,
withAac ? true, faad2, aacgain,
withUnfreeAac ? false, faac,
withFfmpeg ? true, ffmpeg-full,
withMplayer ? false, mplayer,
withSox ? true, sox,
withOpus ? true, opusTools,
withTwolame ? false, twolame,
withApe ? false, mac,
withWavpack ? false, wavpack
}:
assert withAac -> withFfmpeg || withUnfreeAac;
assert withUnfreeAac -> withAac;
let runtimeDeps = []
++ lib.optional withCD cdparanoia
++ lib.optional withFlac flac
++ lib.optional withSpeex speex
++ lib.optional withFfmpeg ffmpeg-full
++ lib.optional withMplayer mplayer
++ lib.optional withSox sox
++ lib.optional withOpus opusTools
++ lib.optional withTwolame twolame
++ lib.optional withApe mac
++ lib.optional withWavpack wavpack
++ lib.optional withUnfreeAac faac
++ lib.optionals withMidi [ fluidsynth timidity ]
++ lib.optionals withVorbis [ vorbis-tools vorbisgain ]
++ lib.optionals withMp3 [ lame mp3gain ]
++ lib.optionals withAac [ faad2 aacgain ];
in
2019-02-20 19:40:22 +00:00
mkDerivation rec {
name = "soundkonverter";
version = "3.0.1";
src = fetchFromGitHub {
owner = "dfaust";
repo = "soundkonverter";
rev = "v" + version;
sha256 = "1g2khdsjmsi4zzynkq8chd11cbdhjzmi37r9jhpal0b730nq9x7l";
};
patches = [
# already merged into master, so it can go during the next release
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/dfaust/soundkonverter/pull/87.patch";
sha256 = "sha256-XIpD4ZMTZVcu+F27OtpRy51H+uQgpd5l22IZ6XsD64w=";
name = "soundkonverter_taglib.patch";
stripLen = 1;
})
];
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config kdelibs4support makeWrapper ];
2019-02-20 19:40:22 +00:00
propagatedBuildInputs = [ libkcddb kconfig kconfigwidgets ki18n kdelibs4support kio solid kwidgetsaddons kxmlgui qtbase phonon];
buildInputs = [ taglib ] ++ runtimeDeps;
# encoder plugins go to ${out}/lib so they're found by kbuildsycoca5
cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" ];
2019-02-20 19:40:22 +00:00
sourceRoot = "source/src";
# add runt-time deps to PATH
postInstall = ''
wrapProgram $out/bin/soundkonverter --prefix PATH : ${lib.makeBinPath runtimeDeps }
'';
meta = {
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.schmittlauch ];
description = "Audio file converter, CD ripper and Replay Gain tool";
longDescription = ''
soundKonverter is a frontend to various audio converters.
2019-02-20 19:40:22 +00:00
The key features are:
- Audio file conversion
- Replay Gain calculation
- CD ripping
2019-02-20 19:40:22 +00:00
soundKonverter supports reading and writing tags and covers for many formats, so they are preserved when converting files.
2019-02-20 19:40:22 +00:00
It is extendable by plugins and supports many backends including:
2019-02-20 19:40:22 +00:00
- Audio file conversion
Backends: faac, faad, ffmpeg, flac, lame, mplayer, neroaac, timidity, fluidsynth, vorbistools, opustools, sox, twolame,
flake, mac, shorten, wavpack and speex
Formats: ogg vorbis, mp3, flac, wma, aac, ac3, opus, alac, mp2, als, amr nb, amr wb, ape, speex, m4a, mp1, musepack shorten,
tta, wavpack, ra, midi, mod, 3gp, rm, avi, mkv, ogv, mpeg, mov, mp4, flv, wmv and rv
2019-02-20 19:40:22 +00:00
- Replay Gain calculation
Backends: aacgain, metaflac, mp3gain, vorbisgain, wvgain, mpcgain
Formats: aac, mp3, flac, ogg vorbis, wavpack, musepack
2019-02-20 19:40:22 +00:00
- CD ripping
Backends: cdparanoia
'';
};
}