qt5: move kdeDerivation to qt5.mkDerivation

This commit is contained in:
Thomas Tuegel 2017-06-02 10:49:32 -05:00
parent 210f688802
commit 7b6f8dc77f
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
18 changed files with 93 additions and 73 deletions

View File

@ -1,4 +1,4 @@
{ kdeDerivation, lib, debug, srcs }: { mkDerivation, lib, srcs }:
args: args:
@ -7,15 +7,10 @@ let
sname = args.sname or name; sname = args.sname or name;
inherit (srcs."${sname}") src version; inherit (srcs."${sname}") src version;
in in
kdeDerivation (args // { mkDerivation (args // {
name = "${name}-${version}"; name = "${name}-${version}";
inherit src; inherit src;
cmakeFlags =
(args.cmakeFlags or [])
++ [ "-DBUILD_TESTING=OFF" ]
++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";
meta = { meta = {
platforms = lib.platforms.linux; platforms = lib.platforms.linux;
homepage = "http://www.kde.org"; homepage = "http://www.kde.org";

View File

@ -27,9 +27,7 @@ still shows most of the available features is in `./gwenview.nix`.
{ {
stdenv, lib, libsForQt5, fetchurl, recurseIntoAttrs, stdenv, lib, libsForQt5, fetchurl, recurseIntoAttrs,
kdeDerivation, plasma5, plasma5, attica, phonon,
attica, phonon,
debug ? false,
}: }:
let let
@ -43,8 +41,9 @@ let
let let
callPackage = self.newScope { callPackage = self.newScope {
kdeApp = import ./build-support/application.nix { kdeApp = import ./build-support/application.nix {
inherit lib kdeDerivation; inherit lib;
inherit debug srcs; inherit srcs;
mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {};
}; };
}; };
in { in {

View File

@ -1,5 +1,5 @@
{ {
kdeDerivation, kdeWrapper, fetchFromGitHub, lib, mkDerivation, kdeWrapper, fetchFromGitHub, lib,
extra-cmake-modules, kdoctools, kconfig, kinit, kjsembed, extra-cmake-modules, kdoctools, kconfig, kinit, kjsembed,
taglib, exiv2, podofo taglib, exiv2, podofo
}: }:
@ -7,7 +7,7 @@
let let
pname = "krename"; pname = "krename";
version = "20170610"; version = "20170610";
unwrapped = kdeDerivation rec { unwrapped = mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -1,5 +1,5 @@
{ {
kdeDerivation, kdeWrapper, fetchurl, lib, mkDerivation, kdeWrapper, fetchurl, lib,
extra-cmake-modules, kdoctools, extra-cmake-modules, kdoctools,
kconfig, kinit, kparts kconfig, kinit, kparts
}: }:
@ -7,7 +7,7 @@
let let
pname = "krusader"; pname = "krusader";
version = "2.6.0"; version = "2.6.0";
unwrapped = kdeDerivation rec { unwrapped = mkDerivation rec {
name = "krusader-${version}"; name = "krusader-${version}";
src = fetchurl { src = fetchurl {
@ -24,7 +24,6 @@ let
nativeBuildInputs = [ extra-cmake-modules kdoctools ]; nativeBuildInputs = [ extra-cmake-modules kdoctools ];
propagatedBuildInputs = [ kconfig kinit kparts ]; propagatedBuildInputs = [ kconfig kinit kparts ];
enableParallelBuilding = true;
}; };
in kdeWrapper { in kdeWrapper {

View File

@ -1,4 +1,4 @@
{ kdeDerivation { mkDerivation
, lib , lib
, fetchurl , fetchurl
, kdoctools , kdoctools
@ -21,7 +21,7 @@ let
unwrapped = let unwrapped = let
pname = "yakuake"; pname = "yakuake";
version = "3.0.3"; version = "3.0.3";
in kdeDerivation rec { in mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {

View File

@ -1,4 +1,4 @@
{ kdeDerivation { mkDerivation
, lib , lib
, fetchurl , fetchurl
, extra-cmake-modules , extra-cmake-modules
@ -31,7 +31,7 @@ let
unwrapped = let unwrapped = let
pname = "konversation"; pname = "konversation";
version = "1.6.2"; version = "1.6.2";
in kdeDerivation rec { in mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {

View File

@ -1,17 +0,0 @@
{ 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";
})

View File

@ -1,4 +1,4 @@
{ kdeDerivation, lib, fetchurl }: { mkDerivation, lib, fetchurl }:
let let
mirror = "mirror://kde"; mirror = "mirror://kde";
@ -12,7 +12,7 @@ let
sname = args.sname or name; sname = args.sname or name;
inherit (srcs."${sname}") src version; inherit (srcs."${sname}") src version;
in in
kdeDerivation (args // { mkDerivation (args // {
name = "${name}-${version}"; name = "${name}-${version}";
inherit src; inherit src;

View File

@ -25,7 +25,7 @@ existing packages here and modify it as necessary.
*/ */
{ {
libsForQt5, kdeDerivation, lib, fetchurl, libsForQt5, lib, fetchurl,
gconf, gconf,
debug ? false, debug ? false,
}: }:
@ -35,7 +35,8 @@ let
let let
callPackage = self.newScope { callPackage = self.newScope {
plasmaPackage = import ./build-support/package.nix { plasmaPackage = import ./build-support/package.nix {
inherit kdeDerivation lib fetchurl; inherit lib fetchurl;
mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {};
}; };
}; };
in { in {

View File

@ -1,4 +1,4 @@
{ kdeDerivation, lib, fetchurl }: { mkDerivation, lib, fetchurl }:
let let
mirror = "mirror://kde"; mirror = "mirror://kde";
@ -10,7 +10,7 @@ args:
let let
inherit (args) name; inherit (args) name;
inherit (srcs."${name}") src version; inherit (srcs."${name}") src version;
in kdeDerivation (args // { in mkDerivation (args // {
name = "${name}-${version}"; name = "${name}-${version}";
inherit src; inherit src;

View File

@ -24,14 +24,15 @@ existing packages here and modify it as necessary.
*/ */
{ libsForQt5, kdeDerivation, lib, fetchurl }: { libsForQt5, lib, fetchurl }:
let let
packages = self: with self; packages = self: with self;
let let
callPackage = self.newScope { callPackage = self.newScope {
kdeFramework = import ./build-support/framework.nix { kdeFramework = import ./build-support/framework.nix {
inherit kdeDerivation lib fetchurl; inherit lib fetchurl;
mkDerivation = libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {};
}; };
}; };
in { in {

View File

@ -33,6 +33,7 @@ existing packages here and modify it as necessary.
# options # options
developerBuild ? false, developerBuild ? false,
decryptSslTraffic ? false, decryptSslTraffic ? false,
debug ? null,
}: }:
with stdenv.lib; with stdenv.lib;
@ -44,12 +45,36 @@ let
mirror = "http://download.qt.io"; mirror = "http://download.qt.io";
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
mkDerivation = args:
stdenv.mkDerivation (args // {
outputs = args.outputs or [ "out" "dev" ];
propagatedUserEnvPkgs =
(args.propagatedUserEnvPkgs or [])
++ map getBin (args.propagatedBuildInputs or []);
qmakeFlags =
(args.qmakeFlags or [])
++ optional (debug != null)
(if debug then "CONFIG+=debug" else "CONFIG+=release");
cmakeFlags =
(args.cmakeFlags or [])
++ [ "-DBUILD_TESTING=OFF" ]
++ optional (debug != null)
(if debug then "-DCMAKE_BUILD_TYPE=Debug"
else "-DCMAKE_BUILD_TYPE=Release");
enableParallelBuilding = args.enableParallelBuilding or true;
});
qtSubmodule = args: qtSubmodule = args:
let let
inherit (args) name; inherit (args) name;
version = args.version or srcs."${name}".version; version = args.version or srcs."${name}".version;
src = args.src or srcs."${name}".src; src = args.src or srcs."${name}".src;
inherit (stdenv) mkDerivation;
in mkDerivation (args // { in mkDerivation (args // {
name = "${name}-${version}"; name = "${name}-${version}";
inherit src; inherit src;
@ -61,13 +86,10 @@ let
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
outputs = args.outputs or [ "out" "dev" ];
setOutputFlags = args.setOutputFlags or false; setOutputFlags = args.setOutputFlags or false;
setupHook = ../qtsubmodule-setup-hook.sh; setupHook = ../qtsubmodule-setup-hook.sh;
enableParallelBuilding = args.enableParallelBuilding or true;
meta = self.qtbase.meta // (args.meta or {}); meta = self.qtbase.meta // (args.meta or {});
}); });
@ -76,6 +98,8 @@ let
callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; }; callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; };
in { in {
inherit mkDerivation;
qtbase = callPackage ./qtbase { qtbase = callPackage ./qtbase {
inherit bison cups harfbuzz mesa; inherit bison cups harfbuzz mesa;
inherit developerBuild decryptSslTraffic; inherit developerBuild decryptSslTraffic;

View File

@ -24,6 +24,7 @@ top-level attribute to `top-level/all-packages.nix`.
# options # options
developerBuild ? false, developerBuild ? false,
decryptSslTraffic ? false, decryptSslTraffic ? false,
debug ? null,
}: }:
with stdenv.lib; with stdenv.lib;
@ -35,12 +36,36 @@ let
mirror = "http://download.qt.io"; mirror = "http://download.qt.io";
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
mkDerivation = args:
stdenv.mkDerivation (args // {
outputs = args.outputs or [ "out" "dev" ];
propagatedUserEnvPkgs =
(args.propagatedUserEnvPkgs or [])
++ map getBin (args.propagatedBuildInputs or []);
qmakeFlags =
(args.qmakeFlags or [])
++ optional (debug != null)
(if debug then "CONFIG+=debug" else "CONFIG+=release");
cmakeFlags =
(args.cmakeFlags or [])
++ [ "-DBUILD_TESTING=OFF" ]
++ optional (debug != null)
(if debug then "-DCMAKE_BUILD_TYPE=Debug"
else "-DCMAKE_BUILD_TYPE=Release");
enableParallelBuilding = args.enableParallelBuilding or true;
});
qtSubmodule = args: qtSubmodule = args:
let let
inherit (args) name; inherit (args) name;
version = args.version or srcs."${name}".version; version = args.version or srcs."${name}".version;
src = args.src or srcs."${name}".src; src = args.src or srcs."${name}".src;
inherit (stdenv) mkDerivation;
in mkDerivation (args // { in mkDerivation (args // {
name = "${name}-${version}"; name = "${name}-${version}";
inherit src; inherit src;
@ -52,13 +77,10 @@ let
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
outputs = args.outputs or [ "out" "dev" ];
setOutputFlags = args.setOutputFlags or false; setOutputFlags = args.setOutputFlags or false;
setupHook = ../qtsubmodule-setup-hook.sh; setupHook = ../qtsubmodule-setup-hook.sh;
enableParallelBuilding = args.enableParallelBuilding or true;
meta = self.qtbase.meta // (args.meta or {}); meta = self.qtbase.meta // (args.meta or {});
}); });
@ -67,6 +89,8 @@ let
callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; }; callPackage = self.newScope { inherit qtCompatVersion qtSubmodule srcs; };
in { in {
inherit mkDerivation;
qtbase = callPackage ./qtbase { qtbase = callPackage ./qtbase {
inherit (srcs.qtbase) src version; inherit (srcs.qtbase) src version;
inherit bison cups harfbuzz mesa; inherit bison cups harfbuzz mesa;

View File

@ -1,5 +1,5 @@
{ {
kdeDerivation, kdeWrapper, fetchurl, lib, mkDerivation, kdeWrapper, fetchurl, lib,
extra-cmake-modules, kdoctools, extra-cmake-modules, kdoctools,
kconfig, kinit kconfig, kinit
}: }:
@ -7,7 +7,7 @@
let let
pname = "kronometer"; pname = "kronometer";
version = "2.1.3"; version = "2.1.3";
unwrapped = kdeDerivation rec { unwrapped = mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {

View File

@ -1,11 +1,11 @@
{ kdeDerivation, kdeWrapper, fetchurl, lib { mkDerivation, kdeWrapper, fetchurl, lib
, ecm, kdoctools , extra-cmake-modules, kdoctools
, kconfig, kinit, kpmcore , kconfig, kinit, kpmcore
, eject, libatasmart }: , eject, libatasmart }:
let let
pname = "partitionmanager"; pname = "partitionmanager";
unwrapped = kdeDerivation rec { unwrapped = mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
version = "3.0.1"; version = "3.0.1";
@ -19,11 +19,10 @@ let
license = licenses.gpl2; license = licenses.gpl2;
maintainers = with maintainers; [ peterhoeg ]; maintainers = with maintainers; [ peterhoeg ];
}; };
nativeBuildInputs = [ ecm kdoctools ]; nativeBuildInputs = [ extra-cmake-modules kdoctools ];
# refer to kpmcore for the use of eject # refer to kpmcore for the use of eject
buildInputs = [ eject libatasmart ]; buildInputs = [ eject libatasmart ];
propagatedBuildInputs = [ kconfig kinit kpmcore ]; propagatedBuildInputs = [ kconfig kinit kpmcore ];
enableParallelBuilding = true;
}; };
in kdeWrapper { in kdeWrapper {

View File

@ -1,5 +1,5 @@
{ {
kdeDerivation, kdeWrapper, fetchFromGitHub, fetchurl, lib, mkDerivation, kdeWrapper, fetchFromGitHub, fetchurl, lib,
extra-cmake-modules, kdoctools, extra-cmake-modules, kdoctools,
baloo, kconfig, kfilemetadata, kinit, kirigami, knewstuff, plasma-framework baloo, kconfig, kfilemetadata, kinit, kirigami, knewstuff, plasma-framework
}: }:
@ -13,7 +13,7 @@ let
rev = "d1be8c43a82a4320306c8e835a86fdb7b2574ca7"; rev = "d1be8c43a82a4320306c8e835a86fdb7b2574ca7";
sha256 = "03ds5da69zipa25rsp76l6xqivrh3wcgygwyqa5x2rgcz3rjnlpr"; sha256 = "03ds5da69zipa25rsp76l6xqivrh3wcgygwyqa5x2rgcz3rjnlpr";
}; };
unwrapped = kdeDerivation rec { unwrapped = mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {

View File

@ -1,10 +1,10 @@
{ {
kdeDerivation, kdeWrapper, lib, fetchgit, fetchpatch, mkDerivation, lib, kdeWrapper, fetchgit, fetchpatch,
extra-cmake-modules, kdoctools, kconfig, kinit, kparts extra-cmake-modules, kdoctools, kconfig, kinit, kparts
}: }:
let let
unwrapped = kdeDerivation rec { unwrapped = mkDerivation rec {
name = "kdiff3-${version}"; name = "kdiff3-${version}";
version = "1.7.0-2017-02-19"; version = "1.7.0-2017-02-19";
@ -34,8 +34,6 @@ let
propagatedBuildInputs = [ kconfig kinit kparts ]; propagatedBuildInputs = [ kconfig kinit kparts ];
enableParallelBuilding = true;
meta = with lib; { meta = with lib; {
homepage = http://kdiff3.sourceforge.net/; homepage = http://kdiff3.sourceforge.net/;
license = licenses.gpl2Plus; license = licenses.gpl2Plus;

View File

@ -292,9 +292,6 @@ with pkgs;
inherit kernel rootModules allowMissing; inherit kernel rootModules allowMissing;
}; };
kdeDerivation = makeOverridable (import ../build-support/kde/derivation.nix)
{ inherit stdenv lib; };
kdeWrapper = callPackage ../build-support/kde/wrapper.nix { kdeWrapper = callPackage ../build-support/kde/wrapper.nix {
inherit (gnome3) dconf; inherit (gnome3) dconf;
}; };
@ -8233,7 +8230,7 @@ with pkgs;
mkFrameworks = import ../development/libraries/kde-frameworks; mkFrameworks = import ../development/libraries/kde-frameworks;
attrs = { attrs = {
inherit libsForQt5; inherit libsForQt5;
inherit kdeDerivation lib fetchurl; inherit lib fetchurl;
}; };
in in
recurseIntoAttrs (makeOverridable mkFrameworks attrs); recurseIntoAttrs (makeOverridable mkFrameworks attrs);
@ -14620,7 +14617,7 @@ with pkgs;
mkApplications = import ../applications/kde; mkApplications = import ../applications/kde;
attrs = { attrs = {
inherit stdenv lib libsForQt5 fetchurl recurseIntoAttrs; inherit stdenv lib libsForQt5 fetchurl recurseIntoAttrs;
inherit kdeDerivation plasma5; inherit plasma5;
inherit attica phonon; inherit attica phonon;
}; };
in in
@ -17570,7 +17567,7 @@ with pkgs;
let let
mkPlasma5 = import ../desktops/plasma-5; mkPlasma5 = import ../desktops/plasma-5;
attrs = { attrs = {
inherit libsForQt5 kdeDerivation lib fetchurl; inherit libsForQt5 lib fetchurl;
inherit (gnome3) gconf; inherit (gnome3) gconf;
}; };
in in