diff --git a/pkgs/build-support/kde/derivation.nix b/pkgs/build-support/kde/derivation.nix new file mode 100644 index 000000000000..2e29a0a661e1 --- /dev/null +++ b/pkgs/build-support/kde/derivation.nix @@ -0,0 +1,17 @@ +{ stdenv, lib, debug ? false }: + +args: + +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"; + +}) diff --git a/pkgs/desktops/kde-5/applications/default.nix b/pkgs/desktops/kde-5/applications/default.nix index a53bbedc2c54..832b88c7e803 100644 --- a/pkgs/desktops/kde-5/applications/default.nix +++ b/pkgs/desktops/kde-5/applications/default.nix @@ -27,7 +27,7 @@ still shows most of the available features is in `./gwenview.nix`. { stdenv, lib, libsForQt5, fetchurl, - plasma5, + kdeDerivation, plasma5, attica, phonon, debug ? false, }: @@ -40,9 +40,8 @@ let packages = self: with self; { kdeApp = import ./kde-app.nix { - inherit lib; + inherit lib kdeDerivation; inherit debug srcs; - inherit (libsForQt5) kdeDerivation; }; kdelibs = callPackage ./kdelibs { diff --git a/pkgs/desktops/plasma-5/default.nix b/pkgs/desktops/plasma-5/default.nix index 683154273ae6..b240ef7496c6 100644 --- a/pkgs/desktops/plasma-5/default.nix +++ b/pkgs/desktops/plasma-5/default.nix @@ -26,7 +26,7 @@ existing packages here and modify it as necessary. { stdenv, lib, libsForQt5, makeSetupHook, symlinkJoin, fetchurl, - gconf, + gconf, kdeDerivation, debug ? false, }: @@ -41,7 +41,7 @@ let inherit (args) name; sname = args.sname or name; inherit (srcs."${sname}") src version; - in libsForQt5.kdeDerivation (args // { + in kdeDerivation (args // { name = "${name}-${version}"; inherit src; diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix index ffb8fb04078b..1ce3d62cf169 100644 --- a/pkgs/development/libraries/kde-frameworks/default.nix +++ b/pkgs/development/libraries/kde-frameworks/default.nix @@ -26,7 +26,7 @@ existing packages here and modify it as necessary. { stdenv, lib, makeSetupHook, makeWrapper, fetchurl, buildEnv, - callPackage, + kdeDerivation, callPackage, debug ? false }: @@ -37,22 +37,6 @@ let packages = rec { - 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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c3e02816e498..7edbbf3b1f7f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -269,6 +269,8 @@ with pkgs; inherit kernel rootModules allowMissing; }; + kdeDerivation = import ../build-support/kde/derivation.nix { inherit stdenv lib; }; + nixBufferBuilders = import ../build-support/emacs/buffer.nix { inherit (pkgs) lib writeText; inherit (emacsPackagesNg) inherit-local; }; pathsFromGraph = ../build-support/kernel/paths-from-graph.pl; @@ -9337,11 +9339,15 @@ with pkgs; mkLibsForQt5 = self: with self; let kdeFrameworks = import ../development/libraries/kde-frameworks { - inherit stdenv lib makeSetupHook makeWrapper fetchurl buildEnv; + inherit stdenv lib kdeDerivation makeSetupHook makeWrapper fetchurl buildEnv; inherit (self) callPackage; }; in { + ### BUILD SUPPORT + + ### LIBRARIES + accounts-qt = callPackage ../development/libraries/accounts-qt { }; fcitx-qt5 = callPackage ../tools/inputmethods/fcitx/fcitx-qt5.nix { }; @@ -14047,7 +14053,7 @@ with pkgs; kdeApplications = import ../desktops/kde-5/applications { inherit stdenv lib libsForQt5 fetchurl; - inherit plasma5; + inherit kdeDerivation plasma5; inherit attica phonon; }; @@ -16814,6 +16820,7 @@ with pkgs; plasma5 = import ../desktops/plasma-5 { inherit stdenv lib libsForQt5 makeSetupHook symlinkJoin fetchurl; + inherit kdeDerivation; inherit (gnome3) gconf; };