diff --git a/pkgs/applications/audio/kid3/default.nix b/pkgs/by-name/ki/kid3/package.nix similarity index 70% rename from pkgs/applications/audio/kid3/default.nix rename to pkgs/by-name/ki/kid3/package.nix index 8cc6f6d8ec604..8403db5c9f3fb 100644 --- a/pkgs/applications/audio/kid3/default.nix +++ b/pkgs/by-name/ki/kid3/package.nix @@ -1,47 +1,44 @@ -{ chromaprint -, cmake -, docbook_xml_dtd_45 -, docbook_xsl -, fetchurl -, ffmpeg -, flac -, id3lib -, kdePackages -, lib -, libogg -, libvorbis -, libxslt -, mp4v2 -, pkg-config -, python3 -, qtbase -, qtdeclarative -, qtmultimedia -, qttools -, readline -, stdenv -, taglib -, wrapQtAppsHook -, zlib -, withCLI ? true -, withKDE ? true -, withQt ? false +{ + lib, + chromaprint, + cmake, + docbook_xml_dtd_45, + docbook_xsl, + fetchurl, + ffmpeg, + flac, + id3lib, + kdePackages, + libogg, + libvorbis, + libxslt, + mp4v2, + pkg-config, + python3, + qt6, + readline, + stdenv, + taglib, + zlib, + # Boolean flags + withCLI ? true, + withKDE ? true, + withQt ? false, }: let - inherit (lib) optionals; + inherit (qt6) + qtbase + qtdeclarative + qtmultimedia + qttools + wrapQtAppsHook + ; apps = lib.concatStringsSep ";" ( - optionals withCLI [ "CLI" ] - ++ optionals withKDE [ "KDE" ] - ++ optionals withQt [ "Qt" ] + lib.optionals withCLI [ "CLI" ] ++ lib.optionals withKDE [ "KDE" ] ++ lib.optionals withQt [ "Qt" ] ); - mainProgram = - if withQt then "kid3-qt" - else if withKDE then "kid3" - else "kid3-cli"; - in stdenv.mkDerivation (finalAttrs: { pname = "kid3"; @@ -62,29 +59,34 @@ stdenv.mkDerivation (finalAttrs: { wrapQtAppsHook ]; - buildInputs = [ - chromaprint - ffmpeg - flac - id3lib - libogg - libvorbis - libxslt - mp4v2 - qtbase - qtdeclarative - qtmultimedia - readline - taglib - zlib - ] ++ lib.optionals withKDE (with kdePackages; [ - kconfig - kconfigwidgets - kcoreaddons - kio - kxmlgui - phonon - ]); + buildInputs = + [ + chromaprint + ffmpeg + flac + id3lib + libogg + libvorbis + libxslt + mp4v2 + qtbase + qtdeclarative + qtmultimedia + readline + taglib + zlib + ] + ++ lib.optionals withKDE ( + with kdePackages; + [ + kconfig + kconfigwidgets + kcoreaddons + kio + kxmlgui + phonon + ] + ); cmakeFlags = [ (lib.cmakeFeature "WITH_APPS" apps) ]; @@ -95,10 +97,8 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - description = "Simple and powerful audio tag editor"; - inherit mainProgram; homepage = "https://kid3.kde.org/"; - license = lib.licenses.lgpl2Plus; + description = "Simple and powerful audio tag editor"; longDescription = '' If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Opus, Speex, TrueAudio, WavPack, WMA, WAV and AIFF files (e.g. full @@ -128,6 +128,14 @@ stdenv.mkDerivation (finalAttrs: { - Edit synchronized lyrics and event timing codes, import and export LRC files. ''; + license = lib.licenses.lgpl2Plus; + mainProgram = + if withQt then + "kid3-qt" + else if withKDE then + "kid3" + else + "kid3-cli"; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.linux; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bda58a57c3ec9..94b3a8f6ea135 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30330,10 +30330,9 @@ with pkgs; khard = callPackage ../applications/misc/khard { }; - 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; + kid3-cli = kid3.override { withCLI = true; withKDE = false; withQt = false; }; + kid3-kde = kid3.override { withCLI = true; withKDE = true; withQt = false; }; + kid3-qt = kid3.override { withCLI = true; withKDE = false; withQt = true; }; kile = callPackage ../applications/editors/kile { };