summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/kronometer/default.nix32
-rw-r--r--pkgs/tools/misc/partition-manager/default.nix39
-rw-r--r--pkgs/tools/misc/peruse/default.nix41
-rw-r--r--pkgs/tools/security/kwalletcli/default.nix78
-rw-r--r--pkgs/tools/text/kdiff3/default.nix81
5 files changed, 123 insertions, 148 deletions
diff --git a/pkgs/tools/misc/kronometer/default.nix b/pkgs/tools/misc/kronometer/default.nix
index 088d01b882d8..6db3278fade0 100644
--- a/pkgs/tools/misc/kronometer/default.nix
+++ b/pkgs/tools/misc/kronometer/default.nix
@@ -1,29 +1,25 @@
 {
-  mkDerivation, kdeWrapper, fetchurl, lib,
-  extra-cmake-modules, kdoctools,
+  mkDerivation, fetchurl, lib,
+  extra-cmake-modules, kdoctools, wrapGAppsHook,
   kconfig, kinit
 }:
 
 let
   pname = "kronometer";
   version = "2.1.3";
-  unwrapped = mkDerivation rec {
-    name = "${pname}-${version}";
+in
+mkDerivation rec {
+  name = "${pname}-${version}";
 
-    src = fetchurl {
-      url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
-      sha256 = "1z06gvaacm3d3a9smlmgg2vf0jdab5kqxx24r6v7iprqzgdpsn4i";
-    };
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
+    sha256 = "1z06gvaacm3d3a9smlmgg2vf0jdab5kqxx24r6v7iprqzgdpsn4i";
+  };
 
-    meta = with lib; {
-      license = licenses.gpl2;
-      maintainers = with maintainers; [ peterhoeg ];
-    };
-    nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-    propagatedBuildInputs = [ kconfig kinit ];
+  meta = with lib; {
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
   };
-in
-kdeWrapper {
-  inherit unwrapped;
-  targets = [ "bin/kronometer" ];
+  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
+  propagatedBuildInputs = [ kconfig kinit ];
 }
diff --git a/pkgs/tools/misc/partition-manager/default.nix b/pkgs/tools/misc/partition-manager/default.nix
index ffee286f57f9..52183a3fff35 100644
--- a/pkgs/tools/misc/partition-manager/default.nix
+++ b/pkgs/tools/misc/partition-manager/default.nix
@@ -1,31 +1,26 @@
-{ mkDerivation, kdeWrapper, fetchurl, lib
-, extra-cmake-modules, kdoctools
+{ mkDerivation, fetchurl, lib
+, extra-cmake-modules, kdoctools, wrapGAppsHook
 , kconfig, kinit, kpmcore
 , eject, libatasmart }:
 
 let
   pname = "partitionmanager";
-  unwrapped = mkDerivation rec {
-    name = "${pname}-${version}";
-    version = "3.0.1";
+in mkDerivation rec {
+  name = "${pname}-${version}";
+  version = "3.0.1";
 
-    src = fetchurl {
-      url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
-      sha256 = "08sb9xa7dvvgha3k2xm1srl339przxpxd2y5bh1lnx6k1x7dk410";
-    };
-
-    meta = with lib; {
-      description = "KDE Partition Manager";
-      license = licenses.gpl2;
-      maintainers = with maintainers; [ peterhoeg ];
-    };
-    nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-    # refer to kpmcore for the use of eject
-    buildInputs = [ eject libatasmart ];
-    propagatedBuildInputs = [ kconfig kinit kpmcore ];
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
+    sha256 = "08sb9xa7dvvgha3k2xm1srl339przxpxd2y5bh1lnx6k1x7dk410";
   };
 
-in kdeWrapper {
-  inherit unwrapped;
-  targets = [ "bin/partitionmanager" ];
+  meta = with lib; {
+    description = "KDE Partition Manager";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
+  # refer to kpmcore for the use of eject
+  buildInputs = [ eject libatasmart ];
+  propagatedBuildInputs = [ kconfig kinit kpmcore ];
 }
diff --git a/pkgs/tools/misc/peruse/default.nix b/pkgs/tools/misc/peruse/default.nix
index 5b5cbbf59cff..cd872fd966e5 100644
--- a/pkgs/tools/misc/peruse/default.nix
+++ b/pkgs/tools/misc/peruse/default.nix
@@ -1,6 +1,6 @@
 {
-  mkDerivation, kdeWrapper, fetchFromGitHub, fetchurl, lib,
-  extra-cmake-modules, kdoctools,
+  mkDerivation, fetchFromGitHub, fetchurl, lib,
+  extra-cmake-modules, kdoctools, wrapGAppsHook,
   baloo, kconfig, kfilemetadata, kinit, kirigami, knewstuff, plasma-framework
 }:
 
@@ -13,33 +13,28 @@ let
     rev    = "d1be8c43a82a4320306c8e835a86fdb7b2574ca7";
     sha256 = "03ds5da69zipa25rsp76l6xqivrh3wcgygwyqa5x2rgcz3rjnlpr";
   };
-  unwrapped = mkDerivation rec {
-    name = "${pname}-${version}";
+in mkDerivation rec {
+  name = "${pname}-${version}";
 
-    src = fetchurl {
-      url = "mirror://kde/stable/${pname}/${name}.tar.xz";
-      sha256 = "1ik2627xynkichsq9x28rkczqn3l3p06q6vw5jdafdh3hisccmjq";
-    };
-
-    nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  src = fetchurl {
+    url = "mirror://kde/stable/${pname}/${name}.tar.xz";
+    sha256 = "1ik2627xynkichsq9x28rkczqn3l3p06q6vw5jdafdh3hisccmjq";
+  };
 
-    propagatedBuildInputs = [ baloo kconfig kfilemetadata kinit kirigami knewstuff plasma-framework ];
+  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
 
-    pathsToLink = [ "/etc/xdg/peruse.knsrc"];
+  propagatedBuildInputs = [ baloo kconfig kfilemetadata kinit kirigami knewstuff plasma-framework ];
 
-    preConfigure = ''
-      rm -rf src/qtquick/karchive-rar/external/unarr
-      ln -s ${unarr} src/qtquick/karchive-rar/external/unarr
-    '';
+  pathsToLink = [ "/etc/xdg/peruse.knsrc"];
 
-    meta = with lib; {
-      license = licenses.gpl2;
-      maintainers = with maintainers; [ peterhoeg ];
-    };
+  preConfigure = ''
+    rm -rf src/qtquick/karchive-rar/external/unarr
+    ln -s ${unarr} src/qtquick/karchive-rar/external/unarr
+  '';
 
+  meta = with lib; {
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
   };
 
-in kdeWrapper {
-  inherit unwrapped;
-  targets = [ "bin/peruse" "bin/perusecreator" ];
 }
diff --git a/pkgs/tools/security/kwalletcli/default.nix b/pkgs/tools/security/kwalletcli/default.nix
index c6217024f1b7..c655e9aecf8b 100644
--- a/pkgs/tools/security/kwalletcli/default.nix
+++ b/pkgs/tools/security/kwalletcli/default.nix
@@ -1,5 +1,5 @@
 {
-  kdeDerivation, kdeWrapper, fetchurl, lib,
+  mkDerivation, fetchurl, lib,
   pkgconfig,
   kcoreaddons, ki18n, kwallet,
   mksh
@@ -8,48 +8,42 @@
 let
   pname = "kwalletcli";
   version = "3.00";
+in
+mkDerivation rec {
+  name = "${pname}-${version}";
 
-  unwrapped = kdeDerivation rec {
-    name = "${pname}-${version}";
-
-    src = fetchurl {
-      url = "https://www.mirbsd.org/MirOS/dist/hosted/kwalletcli/${name}.tar.gz";
-      sha256 = "1q87nm7pkmgvkrml6hgbmv0ddx3871w7x86gn90sjc3vw59qfh98";
-    };
-
-    postPatch = ''
-      substituteInPlace GNUmakefile \
-        --replace '-I/usr/include/KF5/KCoreAddons' '-I${kcoreaddons.dev}/include/KF5/KCoreAddons' \
-        --replace '-I/usr/include/KF5/KI18n'       '-I${ki18n.dev}/include/KF5/KI18n' \
-        --replace '-I/usr/include/KF5/KWallet'     '-I${kwallet.dev}/include/KF5/KWallet' \
-        --replace /usr/bin                         $out/bin \
-        --replace /usr/share/man                   $out/share/man
-    '';
-
-    makeFlags = [ "KDE_VER=5" ];
-
-    # we need this when building against qt 5.8+
-    NIX_CFLAGS_COMPILE = [ "-std=c++11" ];
-
-    nativeBuildInputs = [ pkgconfig ];
-    # if using just kwallet, cmake will be added as a buildInput and fail the build
-    propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ];
-
-    preInstall = ''
-      mkdir -p $out/bin $out/share/man/man1
-    '';
-
-    meta = with lib; {
-      description = "Command-Line Interface to the KDE Wallet";
-      homepage = http://www.mirbsd.org/kwalletcli.htm;
-      license = licenses.miros;
-      maintainers = with maintainers; [ peterhoeg ];
-    };
+  src = fetchurl {
+    url = "https://www.mirbsd.org/MirOS/dist/hosted/kwalletcli/${name}.tar.gz";
+    sha256 = "1q87nm7pkmgvkrml6hgbmv0ddx3871w7x86gn90sjc3vw59qfh98";
   };
 
-in kdeWrapper {
-  inherit unwrapped;
-  targets = map (b: "bin/" + b)
-    [ "kwalletaskpass" "kwalletcli" "kwalletcli_getpin" "pinentry-kwallet" ];
-  paths = [ mksh ];
+  postPatch = ''
+    substituteInPlace GNUmakefile \
+      --replace '-I/usr/include/KF5/KCoreAddons' '-I${kcoreaddons.dev}/include/KF5/KCoreAddons' \
+      --replace '-I/usr/include/KF5/KI18n'       '-I${ki18n.dev}/include/KF5/KI18n' \
+      --replace '-I/usr/include/KF5/KWallet'     '-I${kwallet.dev}/include/KF5/KWallet' \
+      --replace /usr/bin                         $out/bin \
+      --replace /usr/share/man                   $out/share/man
+  '';
+
+  makeFlags = [ "KDE_VER=5" ];
+
+  # we need this when building against qt 5.8+
+  NIX_CFLAGS_COMPILE = [ "-std=c++11" ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  # if using just kwallet, cmake will be added as a buildInput and fail the build
+  propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ];
+  propagatedUserEnvPkgs = [ mksh ];
+
+  preInstall = ''
+    mkdir -p $out/bin $out/share/man/man1
+  '';
+
+  meta = with lib; {
+    description = "Command-Line Interface to the KDE Wallet";
+    homepage = http://www.mirbsd.org/kwalletcli.htm;
+    license = licenses.miros;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
 }
diff --git a/pkgs/tools/text/kdiff3/default.nix b/pkgs/tools/text/kdiff3/default.nix
index 3263fe09f6fd..e1a2f157085f 100644
--- a/pkgs/tools/text/kdiff3/default.nix
+++ b/pkgs/tools/text/kdiff3/default.nix
@@ -1,49 +1,44 @@
 {
-  mkDerivation, lib, kdeWrapper, fetchgit, fetchpatch,
-  extra-cmake-modules, kdoctools, kconfig, kinit, kparts
+  mkDerivation, lib, fetchgit, fetchpatch,
+  extra-cmake-modules, kdoctools, wrapGAppsHook,
+  kconfig, kinit, kparts
 }:
 
-let
-  unwrapped = mkDerivation rec {
-    name = "kdiff3-${version}";
-    version = "1.7.0-2017-02-19";
-
-    src = fetchgit {
-      # gitlab is outdated
-      url = https://anongit.kde.org/scratch/thomasfischer/kdiff3.git;
-      sha256 = "0znlk9m844a6qsskbd898w4yk48dkg5bkqlkd5abvyrk1jipzyy8";
-      rev = "0d2ac328164e3cbe2db35875d3df3a86187ae84f";
-    };
-
-    setSourceRoot = ''sourceRoot="$(echo */kdiff3/)"'';
-
-    patches = [
-      (fetchpatch {
-        name = "git-mergetool.diff"; # see https://gitlab.com/tfischer/kdiff3/merge_requests/2
-        url = "https://gitlab.com/vcunat/kdiff3/commit/6106126216.patch";
-        sha256 = "16xqc24y8bg8gzkdbwapiwi68rzqnkpz4hgn586mi01ngig2fd7y";
-      })
-    ];
-    patchFlags = "-p 2";
-
-    postPatch = ''
-      sed -re "s/(p\\[[^]]+] *== *)('([^']|\\\\')+')/\\1QChar(\\2)/g" -i src/diff.cpp
-    '';
-
-    nativeBuildInputs = [ extra-cmake-modules kdoctools ];
-
-    propagatedBuildInputs = [ kconfig kinit kparts ];
-
-    meta = with lib; {
-      homepage = http://kdiff3.sourceforge.net/;
-      license = licenses.gpl2Plus;
-      description = "Compares and merges 2 or 3 files or directories";
-      maintainers = with maintainers; [ viric peterhoeg ];
-      platforms = with platforms; linux;
-    };
+mkDerivation rec {
+  name = "kdiff3-${version}";
+  version = "1.7.0-2017-02-19";
+
+  src = fetchgit {
+    # gitlab is outdated
+    url = https://anongit.kde.org/scratch/thomasfischer/kdiff3.git;
+    sha256 = "0znlk9m844a6qsskbd898w4yk48dkg5bkqlkd5abvyrk1jipzyy8";
+    rev = "0d2ac328164e3cbe2db35875d3df3a86187ae84f";
   };
 
-in kdeWrapper {
-  inherit unwrapped;
-  targets = [ "bin/kdiff3" ];
+  setSourceRoot = ''sourceRoot="$(echo */kdiff3/)"'';
+
+  patches = [
+    (fetchpatch {
+      name = "git-mergetool.diff"; # see https://gitlab.com/tfischer/kdiff3/merge_requests/2
+      url = "https://gitlab.com/vcunat/kdiff3/commit/6106126216.patch";
+      sha256 = "16xqc24y8bg8gzkdbwapiwi68rzqnkpz4hgn586mi01ngig2fd7y";
+    })
+  ];
+  patchFlags = "-p 2";
+
+  postPatch = ''
+    sed -re "s/(p\\[[^]]+] *== *)('([^']|\\\\')+')/\\1QChar(\\2)/g" -i src/diff.cpp
+  '';
+
+  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
+
+  propagatedBuildInputs = [ kconfig kinit kparts ];
+
+  meta = with lib; {
+    homepage = http://kdiff3.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    description = "Compares and merges 2 or 3 files or directories";
+    maintainers = with maintainers; [ viric peterhoeg ];
+    platforms = with platforms; linux;
+  };
 }