diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2017-05-15 12:05:35 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2017-06-18 08:42:20 -0500 |
commit | 945758f96030ee7762ccdab32a3ffddd028b37b6 (patch) | |
tree | 03a0b4b4a3f69543de77bad73192fb0192d0485f /pkgs | |
parent | eaa644a5af59b1967fb464a61316a1004cb5e888 (diff) |
kdeFrameworks: rename kdeFramework to mkDerivation
Diffstat (limited to 'pkgs')
74 files changed, 275 insertions, 240 deletions
diff --git a/pkgs/development/libraries/kde-frameworks/attica.nix b/pkgs/development/libraries/kde-frameworks/attica.nix index 6c120c20d3ac..c70be1b877d8 100644 --- a/pkgs/development/libraries/kde-frameworks/attica.nix +++ b/pkgs/development/libraries/kde-frameworks/attica.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, extra-cmake-modules, qtbase }: +{ mkDerivation, lib, extra-cmake-modules, qtbase }: -kdeFramework { +mkDerivation { name = "attica"; meta = { maintainers = [ lib.maintainers.ttuegel ]; diff --git a/pkgs/development/libraries/kde-frameworks/baloo.nix b/pkgs/development/libraries/kde-frameworks/baloo.nix index dc7b6af193bc..9bbb9a1101b4 100644 --- a/pkgs/development/libraries/kde-frameworks/baloo.nix +++ b/pkgs/development/libraries/kde-frameworks/baloo.nix @@ -1,9 +1,9 @@ -{ kdeFramework, lib, extra-cmake-modules, kauth, kconfig +{ mkDerivation, lib, extra-cmake-modules, kauth, kconfig , kcoreaddons, kcrash, kdbusaddons, kfilemetadata, ki18n, kidletime , kio, lmdb, qtbase, solid }: -kdeFramework { +mkDerivation { name = "baloo"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; diff --git a/pkgs/development/libraries/kde-frameworks/bluez-qt.nix b/pkgs/development/libraries/kde-frameworks/bluez-qt.nix index 261d9471a771..2f3b960f3bdf 100644 --- a/pkgs/development/libraries/kde-frameworks/bluez-qt.nix +++ b/pkgs/development/libraries/kde-frameworks/bluez-qt.nix @@ -1,9 +1,9 @@ -{ kdeFramework, lib +{ mkDerivation, lib , extra-cmake-modules , qtbase, qtdeclarative }: -kdeFramework { +mkDerivation { name = "bluez-qt"; meta = { maintainers = [ lib.maintainers.ttuegel ]; diff --git a/pkgs/development/libraries/kde-frameworks/breeze-icons.nix b/pkgs/development/libraries/kde-frameworks/breeze-icons.nix index 9a18ade96a80..1c4ed2a99094 100644 --- a/pkgs/development/libraries/kde-frameworks/breeze-icons.nix +++ b/pkgs/development/libraries/kde-frameworks/breeze-icons.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, extra-cmake-modules, qtsvg }: +{ mkDerivation, lib, extra-cmake-modules, qtsvg }: -kdeFramework { +mkDerivation { name = "breeze-icons"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; outputs = [ "out" ]; diff --git a/pkgs/development/libraries/kde-frameworks/build-support/framework.nix b/pkgs/development/libraries/kde-frameworks/build-support/framework.nix deleted file mode 100644 index 04832cf5608b..000000000000 --- a/pkgs/development/libraries/kde-frameworks/build-support/framework.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ mkDerivation, lib, fetchurl }: - -let - mirror = "mirror://kde"; - srcs = import ../srcs.nix { inherit fetchurl mirror; }; -in - -args: - -let - inherit (args) name; - inherit (srcs."${name}") src version; -in mkDerivation (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"; - } // (args.meta or {}); -}) diff --git a/pkgs/development/libraries/kde-frameworks/default.nix b/pkgs/development/libraries/kde-frameworks/default.nix index e5a765d7c164..abe17848f3bc 100644 --- a/pkgs/development/libraries/kde-frameworks/default.nix +++ b/pkgs/development/libraries/kde-frameworks/default.nix @@ -27,14 +27,68 @@ existing packages here and modify it as necessary. { libsForQt5, lib, fetchurl }: let + + srcs = import ./srcs.nix { + inherit fetchurl; + mirror = "mirror://kde"; + }; + + mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {}; + packages = self: with self; let + + propagateBin = + let setupHook = { writeScript }: + writeScript "setup-hook.sh" '' + # Propagate $bin output + propagatedUserEnvPkgs+=" @bin@" + + # Propagate $dev so that this setup hook is propagated + # But only if there is a separate $dev output + if [ "$outputDev" != out ]; then + if [ -n "$crossConfig" ]; then + propagatedBuildInputs+=" @dev@" + else + propagatedNativeBuildInputs+=" @dev@" + fi + fi + ''; + in callPackage setupHook {}; + callPackage = self.newScope { - kdeFramework = import ./build-support/framework.nix { - inherit lib fetchurl; - mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {}; - }; + + inherit propagateBin; + + mkDerivation = args: + let + + inherit (args) name; + inherit (srcs."${name}") src version; + + outputs = args.outputs or [ "out" "dev" "bin" ]; + hasBin = lib.elem "bin" outputs; + hasDev = lib.elem "dev" outputs; + + defaultSetupHook = if hasBin && hasDev then propagateBin else null; + setupHook = args.setupHook or defaultSetupHook; + + meta = { + homepage = "http://www.kde.org"; + license = with lib.licenses; [ + lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12 + ]; + maintainers = [ lib.maintainers.ttuegel ]; + platforms = lib.platforms.linux; + } // (args.meta or {}); + + in mkDerivation (args // { + name = "${name}-${version}"; + inherit meta outputs setupHook src; + }); + }; + in { attica = callPackage ./attica.nix {}; baloo = callPackage ./baloo.nix {}; diff --git a/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix b/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix index f8a774b68555..dfdb6a11803d 100644 --- a/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix +++ b/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/default.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, copyPathsToStore, cmake, pkgconfig }: +{ mkDerivation, lib, copyPathsToStore, cmake, pkgconfig }: -kdeFramework { +mkDerivation { name = "extra-cmake-modules"; patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); diff --git a/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix b/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix index 325758bf91db..8f2d1446fcf0 100644 --- a/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix +++ b/pkgs/development/libraries/kde-frameworks/frameworkintegration.nix @@ -1,11 +1,11 @@ { - kdeFramework, lib, + mkDerivation, lib, extra-cmake-modules, kbookmarks, kcompletion, kconfig, kconfigwidgets, ki18n, kiconthemes, kio, knewstuff, knotifications, kpackage, kwidgetsaddons, libXcursor, qtx11extras }: -kdeFramework { +mkDerivation { name = "frameworkintegration"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; diff --git a/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix b/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix index 25188b009b62..99737ea2b833 100644 --- a/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix +++ b/pkgs/development/libraries/kde-frameworks/kactivities-stats.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, extra-cmake-modules, boost, kactivities, kconfig }: +{ mkDerivation, lib, extra-cmake-modules, boost, kactivities, kconfig }: -kdeFramework { +mkDerivation { name = "kactivities-stats"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; diff --git a/pkgs/development/libraries/kde-frameworks/kactivities.nix b/pkgs/development/libraries/kde-frameworks/kactivities.nix index 167c3f15bbda..59b5639c24ff 100644 --- a/pkgs/development/libraries/kde-frameworks/kactivities.nix +++ b/pkgs/development/libraries/kde-frameworks/kactivities.nix @@ -1,9 +1,9 @@ -{ kdeFramework, lib, extra-cmake-modules, boost, kcmutils, kconfig +{ mkDerivation, lib, extra-cmake-modules, boost, kcmutils, kconfig , kcoreaddons, kdbusaddons, kdeclarative, kglobalaccel, ki18n , kio, kservice, kwindowsystem, kxmlgui, qtdeclarative }: -kdeFramework { +mkDerivation { name = "kactivities"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules ]; diff --git a/pkgs/development/libraries/kde-frameworks/kapidox.nix b/pkgs/development/libraries/kde-frameworks/kapidox.nix index 749cf9b29709..0d3ccc276fc8 100644 --- a/pkgs/development/libraries/kde-frameworks/kapidox.nix +++ b/pkgs/development/libraries/kde-frameworks/kapidox.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, extra-cmake-modules, python }: +{ mkDerivation, lib, extra-cmake-modules, python }: -kdeFramework { +mkDerivation { name = "kapidox"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules python ]; diff --git a/pkgs/development/libraries/kde-frameworks/karchive.nix b/pkgs/development/libraries/kde-frameworks/karchive.nix index 71561b1109c8..5f725a75d56d 100644 --- a/pkgs/development/libraries/kde-frameworks/karchive.nix +++ b/pkgs/development/libraries/kde-frameworks/karchive.nix @@ -1,6 +1,6 @@ -{ kdeFramework, lib, extra-cmake-modules, qtbase }: +{ mkDerivation, lib, extra-cmake-modules, qtbase }: -kdeFramework { +mkDerivation { name = "karchive"; meta = { maintainers = [ lib.maintainers.ttuegel ]; diff --git a/pkgs/development/libraries/kde-frameworks/kauth/default.nix b/pkgs/development/libraries/kde-frameworks/kauth/default.nix index 7561575ae84e..25cdb7f4a19c 100644 --- a/pkgs/development/libraries/kde-frameworks/kauth/default.nix +++ b/pkgs/development/libraries/kde-frameworks/kauth/default.nix @@ -1,6 +1,9 @@ -{ kdeFramework, lib, copyPathsToStore, extra-cmake-modules, kcoreaddons, polkit-qt, qttools }: +{ + mkDerivation, lib, copyPathsToStore, + extra-cmake-modules, kcoreaddons, polkit-qt, qttools +}: -kdeFramework { +mkDerivation { name = "kauth"; meta = { maintainers = [ lib.maintainers.ttuegel ]; }; nativeBuildInputs = [ extra-cmake-modules qttools ]; diff --git a/pkgs/development/libraries/kde-frameworks/kbookmarks.nix b/pkgs/development/libraries/kde-frameworks/kbookmarks.nix index 36ea74058429..0873094af3df 100644 --- a/pkgs/development/libraries/kde-frameworks/kbookmarks.nix +++ b/pkgs/development/libraries/kde-frameworks/kbookmarks.nix @@ -1,9 +1,9 @@ { - kdeFramework, lib, extra-cmake-modules, + |