From 93f3b7e244d3b06036b2fa30570d24d626d13b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Wed, 14 Nov 2018 12:32:51 -0200 Subject: [PATCH] deepin.dde-network-utils: init at 0.1.2 --- .../deepin/dde-network-utils/default.nix | 54 +++++++++++++++++++ .../deepin/dde-network-utils/fix-paths.patch | 23 ++++++++ pkgs/desktops/deepin/default.nix | 3 +- 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 pkgs/desktops/deepin/dde-network-utils/default.nix create mode 100644 pkgs/desktops/deepin/dde-network-utils/fix-paths.patch diff --git a/pkgs/desktops/deepin/dde-network-utils/default.nix b/pkgs/desktops/deepin/dde-network-utils/default.nix new file mode 100644 index 000000000000..f183d0e15f82 --- /dev/null +++ b/pkgs/desktops/deepin/dde-network-utils/default.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchFromGitHub, substituteAll, qmake, pkgconfig, qttools, + dde-qt-dbus-factory, proxychains, which, deepin }: + +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "dde-network-utils"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "1m6njld06yphppyyhygz8mv4gvq2zw0676pbls9m3fs7b3dl56sv"; + }; + + nativeBuildInputs = [ + qmake + pkgconfig + qttools + deepin.setupHook + ]; + + buildInputs = [ + dde-qt-dbus-factory + proxychains + which + ]; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit which proxychains; + }) + ]; + + postPatch = '' + searchHardCodedPaths # for debugging + patchShebangs translate_generation.sh + ''; + + postFixup = '' + searchHardCodedPaths $out # for debugging + ''; + + passthru.updateScript = deepin.updateScript { inherit name; }; + + meta = with stdenv.lib; { + description = "Deepin network utils"; + homepage = https://github.com/linuxdeepin/dde-network-utils; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo ]; + }; +} diff --git a/pkgs/desktops/deepin/dde-network-utils/fix-paths.patch b/pkgs/desktops/deepin/dde-network-utils/fix-paths.patch new file mode 100644 index 000000000000..9f7ecd423c56 --- /dev/null +++ b/pkgs/desktops/deepin/dde-network-utils/fix-paths.patch @@ -0,0 +1,23 @@ +diff -ur dde-network-utils-master.orig/dde-network-utils.pro dde-network-utils-master/dde-network-utils.pro +--- dde-network-utils-master.orig/dde-network-utils.pro 2019-04-04 03:37:46.000000000 -0300 ++++ dde-network-utils-master/dde-network-utils.pro 2019-04-07 05:56:28.283195087 -0300 +@@ -52,6 +52,7 @@ + + QMAKE_PKGCONFIG_NAME = libddenetworkutils + QMAKE_PKGCONFIG_DESCRIPTION = libddenetworkutils ++QMAKE_PKGCONFIG_PREFIX = $$PREFIX + QMAKE_PKGCONFIG_INCDIR = $$includes.path + QMAKE_PKGCONFIG_LIBDIR = $$target.path + QMAKE_PKGCONFIG_DESTDIR = pkgconfig +diff -ur dde-network-utils-master.orig/networkworker.cpp dde-network-utils-master/networkworker.cpp +--- dde-network-utils-master.orig/networkworker.cpp 2019-04-04 03:37:46.000000000 -0300 ++++ dde-network-utils-master/networkworker.cpp 2019-04-07 05:54:28.656479216 -0300 +@@ -80,7 +80,7 @@ + } + } + +- const bool isAppProxyVaild = QProcess::execute("which", QStringList() << "/usr/bin/proxychains4") == 0; ++ const bool isAppProxyVaild = QProcess::execute("@which@/bin/which", QStringList() << "@proxychains@/bin/proxychains4") == 0; + m_networkModel->onAppProxyExistChanged(isAppProxyVaild); + } + diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index d864fd77389e..17ba6b144b2f 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -17,6 +17,7 @@ let go = go_1_11; }; dde-polkit-agent = callPackage ./dde-polkit-agent { }; + dde-network-utils = callPackage ./dde-network-utils { }; dde-qt-dbus-factory = callPackage ./dde-qt-dbus-factory { }; dde-session-ui = callPackage ./dde-session-ui { }; deepin-desktop-base = callPackage ./deepin-desktop-base { }; @@ -38,8 +39,8 @@ let deepin-wm = callPackage ./deepin-wm { }; dpa-ext-gnomekeyring = callPackage ./dpa-ext-gnomekeyring { }; dtkcore = callPackage ./dtkcore { }; - dtkwm = callPackage ./dtkwm { }; dtkwidget = callPackage ./dtkwidget { }; + dtkwm = callPackage ./dtkwm { }; go-dbus-factory = callPackage ./go-dbus-factory { }; go-dbus-generator = callPackage ./go-dbus-generator { }; go-gir-generator = callPackage ./go-gir-generator { };