extra-cmake-modules: separate setup hook from package
This commit is contained in:
parent
6628c55986
commit
6c79045964
@ -21,7 +21,7 @@ let
|
||||
packages = self: with self; {
|
||||
|
||||
kdeApp = import ./kde-app.nix {
|
||||
inherit stdenv lib;
|
||||
inherit kdeDerivation lib;
|
||||
inherit debug srcs;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, lib, debug, srcs }:
|
||||
{ kdeDerivation, lib, debug, srcs }:
|
||||
|
||||
args:
|
||||
|
||||
@ -7,17 +7,10 @@ let
|
||||
sname = args.sname or name;
|
||||
inherit (srcs."${sname}") src version;
|
||||
in
|
||||
stdenv.mkDerivation (args // {
|
||||
kdeDerivation (args // {
|
||||
name = "${name}-${version}";
|
||||
inherit src;
|
||||
|
||||
outputs = args.outputs or [ "dev" "out" ];
|
||||
|
||||
cmakeFlags =
|
||||
(args.cmakeFlags or [])
|
||||
++ [ "-DBUILD_TESTING=OFF" ]
|
||||
++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.linux;
|
||||
homepage = "http://www.kde.org";
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) lib stdenv symlinkJoin;
|
||||
inherit (pkgs) lib makeSetupHook stdenv symlinkJoin;
|
||||
|
||||
mirror = "mirror://kde";
|
||||
srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };
|
||||
@ -24,17 +24,10 @@ let
|
||||
inherit (args) name;
|
||||
sname = args.sname or name;
|
||||
inherit (srcs."${sname}") src version;
|
||||
in stdenv.mkDerivation (args // {
|
||||
in kdeDerivation (args // {
|
||||
name = "${name}-${version}";
|
||||
inherit src;
|
||||
|
||||
outputs = args.outputs or [ "dev" "out" ];
|
||||
|
||||
cmakeFlags =
|
||||
(args.cmakeFlags or [])
|
||||
++ [ "-DBUILD_TESTING=OFF" ]
|
||||
++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";
|
||||
|
||||
meta = {
|
||||
license = with lib.licenses; [
|
||||
lgpl21Plus lgpl3Plus bsd2 mit gpl2Plus gpl3Plus fdl12
|
||||
|
@ -19,13 +19,14 @@ let
|
||||
srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };
|
||||
|
||||
packages = self: with self; {
|
||||
kdeFramework = args:
|
||||
|
||||
kdeDerivation = args:
|
||||
let
|
||||
inherit (args) name;
|
||||
inherit (srcs."${name}") src version;
|
||||
setupHook =
|
||||
let drv = { qtbase, qttools }:
|
||||
makeSetupHook { deps = [ qtbase qttools ]; } ./setup-hook.sh;
|
||||
in callPackage drv {};
|
||||
in stdenv.mkDerivation (args // {
|
||||
name = "${name}-${version}";
|
||||
inherit src;
|
||||
|
||||
outputs = args.outputs or [ "dev" "out" ];
|
||||
|
||||
@ -34,6 +35,20 @@ let
|
||||
++ [ "-DBUILD_TESTING=OFF" ]
|
||||
++ lib.optional debug "-DCMAKE_BUILD_TYPE=Debug";
|
||||
|
||||
nativeBuildInputs =
|
||||
(args.nativeBuildInputs or [])
|
||||
++ [ pkgs.cmake pkgs.pkgconfig setupHook ];
|
||||
|
||||
});
|
||||
|
||||
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
|
||||
@ -47,7 +62,9 @@ let
|
||||
baloo = callPackage ./baloo.nix {};
|
||||
bluez-qt = callPackage ./bluez-qt.nix {};
|
||||
breeze-icons = callPackage ./breeze-icons.nix {};
|
||||
extra-cmake-modules = callPackage ./extra-cmake-modules {};
|
||||
extra-cmake-modules = 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 {};
|
||||
|
@ -1,19 +1,19 @@
|
||||
{ kdeFramework, lib, copyPathsToStore, cmake, pkgconfig, qttools }:
|
||||
{ stdenv, lib, copyPathsToStore, src, version, cmake }:
|
||||
|
||||
kdeFramework {
|
||||
name = "extra-cmake-modules";
|
||||
stdenv.mkDerivation {
|
||||
name = "extra-cmake-modules-${version}";
|
||||
|
||||
inherit src;
|
||||
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
|
||||
outputs = [ "out" ]; # this package has no runtime components
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
# It is OK to propagate these inputs as long as
|
||||
# extra-cmake-modules is never a propagated input
|
||||
# of some other derivation.
|
||||
propagatedNativeBuildInputs = [ cmake pkgconfig qttools ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = with lib; {
|
||||
platforms = lib.platforms.linux;
|
||||
homepage = "http://www.kde.org";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ maintainers.ttuegel ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user