<commit_before>/*

# Updates

1. Update the URL in `maintainers/scripts/generate-kde-frameworks.sh` and
   run that script from the top of the Nixpkgs tree.
2. Check that the new packages build correctly.
3. Commit the changes and open a pull request.

*/

{ pkgs, debug ? false }:

let

  inherit (pkgs) lib makeSetupHook stdenv;

  mirror = "mirror://kde";
  srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };

  packages = self: with self; {

    kdeDerivation = args:
      let
      in stdenv.mkDerivation (args // {

        outputs = args.outputs or [ "out" "dev" ];

        propagatedUserEnvPkgs =
          builtins.map lib.getBin (args.propagatedBuildInputs or []);

        cmakeFlags =
          (args.cmakeFlags or [])
          ++ [ "-DBUILD_TESTING=OFF" ]
          ++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";

      });

    kdeFramework = args:
      let
        inherit (args) name;
        inherit (srcs."${name}") src version;
        qtVersion = (builtins.parseDrvName self.qtbase.name).version;
      in kdeDerivation (args // {
        name = "${name}-${version}";
        inherit src;

        meta = {
          license = with lib.licenses; [
            lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
          ];
          platforms = lib.platforms.linux;
          homepage = "http://www.kde.org";
          broken = builtins.compareVersions qtVersion "5.6.0" < 0;
        } // (args.meta or {});
      });

    kdeEnv = import ./kde-env.nix {
      inherit (pkgs) stdenv lib;
      inherit (pkgs.xorg) lndir;
    };

    kdeWrapper = import ./kde-wrapper.nix {
      inherit (pkgs) stdenv lib makeWrapper;
      inherit kdeEnv;
    };

    attica = callPackage ./attica.nix {};
    baloo = callPackage ./baloo.nix {};
    bluez-qt = callPackage ./bluez-qt.nix {};
    breeze-icons = callPackage ./breeze-icons.nix {};
    ecm =
      let drv = { cmake, ecmNoHooks, pkgconfig, qtbase, qttools }:
            makeSetupHook
            { deps = lib.chooseDevOutputs [ cmake ecmNoHooks pkgconfig qtbase qttools ]; }
            ./setup-hook.sh;
      in callPackage drv {};
    ecmNoHooks = callPackage ./extra-cmake-modules {
      inherit (srcs.extra-cmake-modules) src version;
    };
    frameworkintegration = callPackage ./frameworkintegration.nix {};
    kactivities = callPackage ./kactivities.nix {};
    kactivities-stats = callPackage ./kactivities-stats.nix {};
    kapidox = callPackage ./kapidox.nix {};
    karchive = callPackage ./karchive.nix {};
    kauth = callPackage ./kauth {};
    kbookmarks = callPackage ./kbookmarks.nix {};
    kcmutils = callPackage ./kcmutils {};
    kcodecs = callPackage ./kcodecs.nix {};
    kcompletion = callPackage ./kcompletion.nix {};
    kconfig = callPackage ./kconfig.nix {};
    kconfigwidgets = callPackage ./kconfigwidgets {};
    kcoreaddons = callPackage ./kcoreaddons.nix {};
    kcrash = callPackage ./kcrash.nix {};
    kdbusaddons = callPackage ./kdbusaddons.nix {};
    kdeclarative = callPackage ./kdeclarative.nix {};
    kded = callPackage ./kded.nix {};
    kdelibs4support = callPackage ./kdelibs4support {};
    kdesignerplugin = callPackage ./kdesignerplugin.nix {};
    kdesu = callPackage ./kdesu.nix {};
    kdnssd = callPackage ./kdnssd.nix {};
    kdoctools = callPackage ./kdoctools {};
    kemoticons = callPackage ./kemoticons.nix {};
    kfilemetadata = callPackage ./kfilemetadata {};
    kglobalaccel = callPackage ./kglobalaccel.nix {};
    kguiaddons = callPackage ./kguiaddons.nix {};
    khtml = callPackage ./khtml.nix {};
    ki18n = callPackage ./ki18n.nix {};
    kiconthemes = callPackage ./kiconthemes {};
    kidletime = callPackage ./kidletime.nix {};
    kimageformats = callPackage ./kimageformats.nix {};
    kinit = callPackage ./kinit {};
    kio = callPackage ./kio {};
    kitemmodels = callPackage ./kitemmodels.nix {};
    kitemviews = callPackage ./kitemviews.nix {};
    kjobwidgets = callPackage ./kjobwidgets.nix {};
    kjs = callPackage ./kjs.nix {};
    kjsembed = callPackage ./kjsembed.nix {};
    kmediaplayer = callPackage ./kmediaplayer.nix {};
    knewstuff = callPackage ./knewstuff.nix {};
    knotifications = callPackage ./knotifications.nix {};
    knotifyconfig = callPackage ./knotifyconfig.nix {};
    kpackage = callPackage ./kpackage {};
    kparts = callPackage ./kparts.nix {};
    kpeople = callPackage ./kpeople.nix {};
    kplotting = callPackage ./kplotting.nix {};
    kpty = callPackage ./kpty.nix {};
    kross = callPackage ./kross.nix {};
    krunner = callPackage ./krunner.nix {};
    kservice = callPackage ./kservice {};
    ktexteditor = callPackage ./ktexteditor.nix {};
    ktextwidgets = callPackage ./ktextwidgets.nix {};
    kunitconversion = callPackage ./kunitconversion.nix {};
    kwallet = callPackage ./kwallet.nix {};
    kwayland = callPackage ./kwayland.nix {};
    kwidgetsaddons = callPackage ./kwidgetsaddons.nix {};
    kwindowsystem = callPackage ./kwindowsystem.nix {};
    kxmlgui = callPackage ./kxmlgui.nix {};
    kxmlrpcclient = callPackage ./kxmlrpcclient.nix {};
    modemmanager-qt = callPackage ./modemmanager-qt.nix {};
    networkmanager-qt = callPackage ./networkmanager-qt.nix {};
    oxygen-icons5 = callPackage ./oxygen-icons5.nix {};
    plasma-framework = callPackage ./plasma-framework.nix {};
    solid = callPackage ./solid.nix {};
    sonnet = callPackage ./sonnet.nix {};
    threadweaver = callPackage ./threadweaver.nix {};
  };

in packages
<commit_msg>kde: use qtbase.version instead of parsing qtbase.name<commit_after>/*

# Updates

1. Update the URL in `maintainers/scripts/generate-kde-frameworks.sh` and
   run that script from the top of the Nixpkgs tree.
2. Check that the new packages build correctly.
3. Commit the changes and open a pull request.

*/

{ pkgs, debug ? false }:

let

  inherit (pkgs) lib makeSetupHook stdenv;

  mirror = "mirror://kde";
  srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };

  packages = self: with self; {

    kdeDerivation = args:
      let
      in stdenv.mkDerivation (args // {

        outputs = args.outputs or [ "out" "dev" ];

        propagatedUserEnvPkgs =
          builtins.map lib.getBin (args.propagatedBuildInputs or []);

        cmakeFlags =
          (args.cmakeFlags or [])
          ++ [ "-DBUILD_TESTING=OFF" ]
          ++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";

      });

    kdeFramework = args:
      let
        inherit (args) name;
        inherit (srcs."${name}") src version;
      in kdeDerivation (args // {
        name = "${name}-${version}";
        inherit src;

        meta = {
          license = with lib.licenses; [
            lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
          ];
          platforms = lib.platforms.linux;
          homepage = "http://www.kde.org";
          broken = builtins.compareVersions self.qtbase.version "5.6.0" < 0;
        } // (args.meta or {});
      });

    kdeEnv = import ./kde-env.nix {
      inherit (pkgs) stdenv lib;
      inherit (pkgs.xorg) lndir;
    };

    kdeWrapper = import ./kde-wrapper.nix {
      inherit (pkgs) stdenv lib makeWrapper;
      inherit kdeEnv;
    };

    attica = callPackage ./attica.nix {};
    baloo = callPackage ./baloo.nix {};
    bluez-qt = callPackage ./bluez-qt.nix {};
    breeze-icons = callPackage ./breeze-icons.nix {};
    ecm =
      let drv = { cmake, ecmNoHooks, pkgconfig, qtbase, qttools }:
            makeSetupHook
            { deps = lib.chooseDevOutputs [ cmake ecmNoHooks pkgconfig qtbase qttools ]; }
            ./setup-hook.sh;
      in callPackage drv {};
    ecmNoHooks = callPackage ./extra-cmake-modules {
      inherit (srcs.extra-cmake-modules) src version;
    };
    frameworkintegration = callPackage ./frameworkintegration.nix {};
    kactivities = callPackage ./kactivities.nix {};
    kactivities-stats = callPackage ./kactivities-stats.nix {};
    kapidox = callPackage ./kapidox.nix {};
    karchive = callPackage ./karchive.nix {};
    kauth = callPackage ./kauth {};
    kbookmarks = callPackage ./kbookmarks.nix {};
    kcmutils = callPackage ./kcmutils {};
    kcodecs = callPackage ./kcodecs.nix {};
    kcompletion = callPackage ./kcompletion.nix {};
    kconfig = callPackage ./kconfig.nix {};
    kconfigwidgets = callPackage ./kconfigwidgets {};
    kcoreaddons = callPackage ./kcoreaddons.nix {};
    kcrash = callPackage ./kcrash.nix {};
    kdbusaddons = callPackage ./kdbusaddons.nix {};
    kdeclarative = callPackage ./kdeclarative.nix {};
    kded = callPackage ./kded.nix {};
    kdelibs4support = callPackage ./kdelibs4support {};
    kdesignerplugin = callPackage ./kdesignerplugin.nix {};
    kdesu = callPackage ./kdesu.nix {};
    kdnssd = callPackage ./kdnssd.nix {};
    kdoctools = callPackage ./kdoctools {};
    kemoticons = callPackage ./kemoticons.nix {};
    kfilemetadata = callPackage ./kfilemetadata {};
    kglobalaccel = callPackage ./kglobalaccel.nix {};
    kguiaddons = callPackage ./kguiaddons.nix {};
    khtml = callPackage ./khtml.nix {};
    ki18n = callPackage ./ki18n.nix {};
    kiconthemes = callPackage ./kiconthemes {};
    kidletime = callPackage ./kidletime.nix {};
    kimageformats = callPackage ./kimageformats.nix {};
    kinit = callPackage ./kinit {};
    kio = callPackage ./kio {};
    kitemmodels = callPackage ./kitemmodels.nix {};
    kitemviews = callPackage ./kitemviews.nix {};
    kjobwidgets = callPackage ./kjobwidgets.nix {};
    kjs = callPackage ./kjs.nix {};
    kjsembed = callPackage ./kjsembed.nix {};
    kmediaplayer = callPackage ./kmediaplayer.nix {};
    knewstuff = callPackage ./knewstuff.nix {};
    knotifications = callPackage ./knotifications.nix {};
    knotifyconfig = callPackage ./knotifyconfig.nix {};
    kpackage = callPackage ./kpackage {};
    kparts = callPackage ./kparts.nix {};
    kpeople = callPackage ./kpeople.nix {};
    kplotting = callPackage ./kplotting.nix {};
    kpty = callPackage ./kpty.nix {};
    kross = callPackage ./kross.nix {};
    krunner = callPackage ./krunner.nix {};
    kservice = callPackage ./kservice {};
    ktexteditor = callPackage ./ktexteditor.nix {};
    ktextwidgets = callPackage ./ktextwidgets.nix {};
    kunitconversion = callPackage ./kunitconversion.nix {};
    kwallet = callPackage ./kwallet.nix {};
    kwayland = callPackage ./kwayland.nix {};
    kwidgetsaddons = callPackage ./kwidgetsaddons.nix {};
    kwindowsystem = callPackage ./kwindowsystem.nix {};
    kxmlgui = callPackage ./kxmlgui.nix {};
    kxmlrpcclient = callPackage ./kxmlrpcclient.nix {};
    modemmanager-qt = callPackage ./modemmanager-qt.nix {};
    networkmanager-qt = callPackage ./networkmanager-qt.nix {};
    oxygen-icons5 = callPackage ./oxygen-icons5.nix {};
    plasma-framework = callPackage ./plasma-framework.nix {};
    solid = callPackage ./solid.nix {};
    sonnet = callPackage ./sonnet.nix {};
    threadweaver = callPackage ./threadweaver.nix {};
  };

in packages

{'fraction_non_alphanumeric': 0.13448056086679414, 'fraction_numerical': 0.00418829099517436, 'mean_word_length': 2.6310743801652894, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5931787', 'n_tokens_mistral': 3654, 'n_tokens_neox': 3437, 'n_words': 769}