kid3: build with qt6 and KDE support

This commit is contained in:
Peter Hoeg 2024-04-01 17:17:07 +02:00
parent 250855f6b6
commit c392dd7997
2 changed files with 43 additions and 15 deletions

View file

@ -1,5 +1,4 @@
{
chromaprint
{ chromaprint
, cmake
, docbook_xml_dtd_45
, docbook_xsl
@ -7,25 +6,43 @@
, ffmpeg
, flac
, id3lib
, kdePackages
, lib
, libogg
, libvorbis
, libxslt
, mp4v2
, phonon
, pkg-config
, python3
, qtbase
, qtdeclarative
, qtmultimedia
, qtquickcontrols
, qttools
, readline
, stdenv
, taglib
, wrapQtAppsHook
, zlib
, withCLI ? true
, withKDE ? true
, withQt ? false
}:
let
inherit (lib) optionals;
apps = lib.concatStringsSep ";" (
optionals withCLI [ "CLI" ]
++ optionals withKDE [ "KDE" ]
++ optionals withQt [ "Qt" ]
);
mainProgram =
if withQt then "kid3-qt"
else if withKDE then "kid3"
else "kid3-cli";
in
stdenv.mkDerivation (finalAttrs: {
pname = "kid3";
version = "3.9.5";
@ -41,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
docbook_xsl
pkg-config
python3
qttools
wrapQtAppsHook
];
@ -53,25 +71,32 @@ stdenv.mkDerivation (finalAttrs: {
libvorbis
libxslt
mp4v2
phonon
qtbase
qtdeclarative
qtmultimedia
qtquickcontrols
qttools
readline
taglib
zlib
];
] ++ lib.optionals withKDE (with kdePackages; [
kconfig
kconfigwidgets
kcoreaddons
kio
kxmlgui
phonon
]);
cmakeFlags = [ "-DWITH_APPS=Qt;CLI" ];
NIX_LDFLAGS = "-lm -lpthread";
cmakeFlags = [ (lib.cmakeFeature "WITH_APPS" apps) ];
preConfigure = ''
export DOCBOOKDIR="${docbook_xsl}/xml/xsl/docbook/"
'';
env = {
DOCBOOKDIR = "${docbook_xsl}/xml/xsl/docbook/";
LANG = "C.UTF-8";
NIX_LDFLAGS = "-lm -lpthread";
};
meta = {
description = "A simple and powerful audio tag editor";
inherit mainProgram;
homepage = "https://kid3.kde.org/";
license = lib.licenses.lgpl2Plus;
longDescription = ''
@ -103,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: {
- Edit synchronized lyrics and event timing codes, import and export
LRC files.
'';
maintainers = [ lib.maintainers.AndersonTorres ];
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
};
})

View file

@ -32420,7 +32420,10 @@ with pkgs;
khard = callPackage ../applications/misc/khard { };
kid3 = libsForQt5.callPackage ../applications/audio/kid3 { };
kid3-cli = qt6Packages.callPackage ../applications/audio/kid3 { withCLI = true; withKDE = false; withQt = false; };
kid3-kde = qt6Packages.callPackage ../applications/audio/kid3 { withCLI = true; withKDE = true; withQt = false; };
kid3-qt = qt6Packages.callPackage ../applications/audio/kid3 { withCLI = true; withKDE = false; withQt = true; };
kid3 = kid3-kde;
kile = libsForQt5.callPackage ../applications/editors/kile { };