From cad99590a2f132be578a234490c5fa416aa6109a Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 27 Feb 2020 08:23:32 -0800 Subject: [PATCH] glances: move from python-module to application --- .../system}/glances/default.nix | 25 +++++++++++-------- .../system}/glances/skip-failing-tests.patch | 0 pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 2 +- 4 files changed, 17 insertions(+), 12 deletions(-) rename pkgs/{development/python-modules => applications/system}/glances/default.nix (79%) rename pkgs/{development/python-modules => applications/system}/glances/skip-failing-tests.patch (100%) diff --git a/pkgs/development/python-modules/glances/default.nix b/pkgs/applications/system/glances/default.nix similarity index 79% rename from pkgs/development/python-modules/glances/default.nix rename to pkgs/applications/system/glances/default.nix index 0a0864e52b6c..946cc1125863 100644 --- a/pkgs/development/python-modules/glances/default.nix +++ b/pkgs/applications/system/glances/default.nix @@ -1,13 +1,12 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, fetchpatch, isPyPy, lib -, psutil, setuptools, bottle, batinfo, pysnmp -, hddtemp, future +{ stdenv, buildPythonApplication, fetchFromGitHub, fetchpatch, isPyPy, lib +, future, psutil, setuptools # Optional dependencies: +, bottle, batinfo, pysnmp +, hddtemp , netifaces # IP module -# Tests: -, unittest2 }: -buildPythonPackage rec { +buildPythonApplication rec { pname = "glances"; version = "3.1.3"; disabled = isPyPy; @@ -44,13 +43,18 @@ buildPythonPackage rec { ]; doCheck = true; - checkInputs = [ unittest2 ]; preCheck = lib.optional stdenv.isDarwin '' export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks ''; - propagatedBuildInputs = [ psutil setuptools bottle batinfo pysnmp future + propagatedBuildInputs = [ + batinfo + bottle + future netifaces + psutil + pysnmp + setuptools ] ++ lib.optional stdenv.isLinux hddtemp; preConfigure = '' @@ -58,10 +62,9 @@ buildPythonPackage rec { ''; meta = with lib; { - homepage = https://nicolargo.github.io/glances/; + homepage = "https://nicolargo.github.io/glances/"; description = "Cross-platform curses-based monitoring tool"; license = licenses.lgpl3; - maintainers = with maintainers; [ primeos koral ]; - platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ jonringer primeos koral ]; }; } diff --git a/pkgs/development/python-modules/glances/skip-failing-tests.patch b/pkgs/applications/system/glances/skip-failing-tests.patch similarity index 100% rename from pkgs/development/python-modules/glances/skip-failing-tests.patch rename to pkgs/applications/system/glances/skip-failing-tests.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1d10df86f7c1..c7bfb8a7acfa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -929,6 +929,8 @@ in gjs = callPackage ../development/libraries/gjs { }; + glances = python3Packages.callPackage ../applications/system/glances { }; + glasgow = with python3Packages; toPythonApplication glasgow; gucci = callPackage ../tools/text/gucci { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c182c586f211..d7ef1072ec5a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3724,7 +3724,7 @@ in { git-sweep = callPackage ../development/python-modules/git-sweep { }; - glances = callPackage ../development/python-modules/glances { }; + glances = throw "glances has moved to pkgs.glances"; # added 2020-20-28 github3_py = callPackage ../development/python-modules/github3_py { };