diff --git a/pkgs/applications/system/glances/default.nix b/pkgs/by-name/gl/glances/package.nix similarity index 75% rename from pkgs/applications/system/glances/default.nix rename to pkgs/by-name/gl/glances/package.nix index 3feb79caab1a..c5929080386a 100644 --- a/pkgs/applications/system/glances/default.nix +++ b/pkgs/by-name/gl/glances/package.nix @@ -1,38 +1,20 @@ { - stdenv, - buildPythonApplication, - fetchFromGitHub, - isPyPy, lib, - chevron, - defusedxml, - packaging, - psutil, - pyinstrument, - setuptools, - nixosTests, - pytestCheckHook, - which, - podman, - selenium, - python-jose, - # Optional dependencies: - fastapi, - jinja2, - pysnmp, + stdenv, + fetchFromGitHub, hddtemp, - uvicorn, - requests, - prometheus-client, - shtab, + nixosTests, + podman, + python3Packages, + which, }: -buildPythonApplication (finalAttrs: { +python3Packages.buildPythonApplication (finalAttrs: { pname = "glances"; version = "4.5.2"; pyproject = true; - disabled = isPyPy; + disabled = python3Packages.isPyPy; src = fetchFromGitHub { owner = "nicolargo"; @@ -41,7 +23,7 @@ buildPythonApplication (finalAttrs: { hash = "sha256-o/q/zW7lRKQg+u4XblwNIswCVIroMdeUaPTNkN8QKwo="; }; - build-system = [ setuptools ]; + build-system = with python3Packages; [ setuptools ]; # On Darwin this package segfaults due to mismatch of pure and impure # CoreFoundation. This issues was solved for binaries but for interpreted @@ -56,34 +38,40 @@ buildPythonApplication (finalAttrs: { # some tests fail in darwin sandbox doCheck = !stdenv.hostPlatform.isDarwin; - dependencies = [ - defusedxml - packaging - psutil - pyinstrument - pysnmp - fastapi - uvicorn - requests - jinja2 - python-jose - which - prometheus-client - shtab - ] - ++ lib.optional stdenv.hostPlatform.isLinux hddtemp; + dependencies = + with python3Packages; + [ + defusedxml + packaging + psutil + pyinstrument + pysnmp + fastapi + uvicorn + requests + jinja2 + python-jose + prometheus-client + shtab + ] + ++ [ which ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ hddtemp ]; passthru.tests = { service = nixosTests.glances; }; - nativeCheckInputs = [ - chevron - which - pytestCheckHook - selenium - podman - ]; + nativeCheckInputs = + with python3Packages; + [ + chevron + pytestCheckHook + selenium + ] + ++ [ + podman + which + ]; disabledTestPaths = [ # Message: Unable to obtain driver for chrome diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 033bc0eac052..34b85cecae09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1535,8 +1535,6 @@ with pkgs; gistyc = with python3Packages; toPythonApplication gistyc; - glances = python3Packages.callPackage ../applications/system/glances { }; - glm_1_0_1 = callPackage ../by-name/gl/glm/1_0_1.nix { }; go2tv-lite = go2tv.override { withGui = false; };