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

View File

@ -32420,7 +32420,10 @@ with pkgs;
khard = callPackage ../applications/misc/khard { }; 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 { }; kile = libsForQt5.callPackage ../applications/editors/kile { };