Unverified Commit 875fe66f authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

glances: migrate to by-name (#506355)

parents 324e16e8 0fb4a6fe
Loading
Loading
Loading
Loading
+36 −48
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonApplication,
  fetchFromGitHub,
  isPyPy,
  lib,
  chevron,
  defusedxml,
  packaging,
  psutil,
  pyinstrument,
  setuptools,
  hddtemp,
  nixosTests,
  pytestCheckHook,
  which,
  podman,
  selenium,
  python-jose,
  # Optional dependencies:
  fastapi,
  jinja2,
  pysnmp,
  hddtemp,
  uvicorn,
  requests,
  prometheus-client,
  shtab,
  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,7 +38,9 @@ buildPythonApplication (finalAttrs: {
  # some tests fail in darwin sandbox
  doCheck = !stdenv.hostPlatform.isDarwin;

  dependencies = [
  dependencies =
    with python3Packages;
    [
      defusedxml
      packaging
      psutil
@@ -67,22 +51,26 @@ buildPythonApplication (finalAttrs: {
      requests
      jinja2
      python-jose
    which
      prometheus-client
      shtab
    ]
  ++ lib.optional stdenv.hostPlatform.isLinux hddtemp;
    ++ [ which ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [ hddtemp ];

  passthru.tests = {
    service = nixosTests.glances;
  };

  nativeCheckInputs = [
  nativeCheckInputs =
    with python3Packages;
    [
      chevron
    which
      pytestCheckHook
      selenium
    ]
    ++ [
      podman
      which
    ];

  disabledTestPaths = [
+0 −2
Original line number Diff line number Diff line
@@ -1529,8 +1529,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; };