From 03f939ebf77d835c5195f8c1134b4c96eacca50d Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Sun, 30 Apr 2017 13:58:08 +0800 Subject: [PATCH] kirigami2: 1.90.0 -> 2.1.0 Also use a generic builder. --- .../libraries/kirigami/default.nix | 54 +++++++++++++------ pkgs/development/libraries/kirigami/v2.nix | 24 --------- pkgs/top-level/all-packages.nix | 6 +-- 3 files changed, 42 insertions(+), 42 deletions(-) delete mode 100644 pkgs/development/libraries/kirigami/v2.nix diff --git a/pkgs/development/libraries/kirigami/default.nix b/pkgs/development/libraries/kirigami/default.nix index 66e67e6b8538..e24ad8196ee3 100644 --- a/pkgs/development/libraries/kirigami/default.nix +++ b/pkgs/development/libraries/kirigami/default.nix @@ -1,23 +1,47 @@ -{ stdenv, fetchurl, cmake, extra-cmake-modules, pkgconfig, plasma-framework, qtbase, qtquickcontrols }: +{ stdenv, fetchurl, cmake, extra-cmake-modules, pkgconfig +, plasma-framework, qtbase +, qtquickcontrols ? null +, qtquickcontrols2 ? null }: -stdenv.mkDerivation rec { +let pname = "kirigami"; - version = "1.1.0"; - name = "${pname}-${version}"; - src = fetchurl { - url = "mirror://kde/stable/${pname}/${name}.tar.xz"; - sha256 = "1p9ydggwbyfdgwmvyc8004sk9mfshlg9b83lzvz9qk3a906ayxv6"; + generic = { name, version, sha256, qtqc, broken }: + stdenv.mkDerivation rec { + inherit name version; + + src = fetchurl { + url = "mirror://kde/stable/${pname}/${name}.tar.xz"; + inherit sha256; + }; + + buildInputs = [ plasma-framework qtbase qtqc ]; + + nativeBuildInputs = [ cmake pkgconfig extra-cmake-modules ]; + + meta = with stdenv.lib; { + license = licenses.lgpl2; + homepage = http://www.kde.org; + maintainers = with maintainers; [ ttuegel peterhoeg ]; + platforms = platforms.unix; + inherit broken; + }; }; - buildInputs = [ qtbase qtquickcontrols plasma-framework ]; +in { + kirigami_1 = generic rec { + name = "${pname}-${version}"; + version = "1.1.0"; + sha256 = "1p9ydggwbyfdgwmvyc8004sk9mfshlg9b83lzvz9qk3a906ayxv6"; + qtqc = qtquickcontrols; + broken = false; + }; - nativeBuildInputs = [ cmake pkgconfig extra-cmake-modules ]; - - meta = with stdenv.lib; { - license = licenses.lgpl2; - homepage = http://www.kde.org; - maintainers = with maintainers; [ ttuegel peterhoeg ]; - platforms = platforms.unix; + kirigami_2 = generic rec { + name = "${pname}2-${version}"; + version = "2.1.0"; + sha256 = "0d79h10jzv9z7xzap4k9vbw6p9as8vdkz3x6xlzx407i9sbzyi77"; + qtqc = qtquickcontrols2; + broken = builtins.compareVersions qtbase.version "5.7.0" < 0; }; } diff --git a/pkgs/development/libraries/kirigami/v2.nix b/pkgs/development/libraries/kirigami/v2.nix deleted file mode 100644 index 0b332d40329d..000000000000 --- a/pkgs/development/libraries/kirigami/v2.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, fetchurl, cmake, extra-cmake-modules, pkgconfig, plasma-framework, qtbase, qtquickcontrols2 }: - -stdenv.mkDerivation rec { - pname = "kirigami"; - version = "1.90.0"; - name = "${pname}2-${version}"; - - src = fetchurl { - url = "mirror://kde/unstable/${pname}/${pname}-${version}.tar.xz"; - sha256 = "a5ca094a60d1cc48116cbed07bbe68be016773d2488a91e278859c90f59e64a8"; - }; - - buildInputs = [ qtbase qtquickcontrols2 plasma-framework ]; - - nativeBuildInputs = [ cmake pkgconfig extra-cmake-modules ]; - - meta = with stdenv.lib; { - license = licenses.lgpl2; - homepage = http://www.kde.org; - maintainers = with maintainers; [ ttuegel peterhoeg ]; - platforms = platforms.unix; - broken = builtins.compareVersions qtbase.version "5.7.0" < 0; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cb8fd3f41f1a..727b7d3dc9e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9601,9 +9601,9 @@ with pkgs; grantlee = callPackage ../development/libraries/grantlee/5.x.nix { }; - kirigami_1 = callPackage ../development/libraries/kirigami { }; - - kirigami_2 = callPackage ../development/libraries/kirigami/v2.nix { }; + inherit (callPackage ../development/libraries/kirigami { }) + kirigami_1 + kirigami_2; kirigami = kirigami_1;