~ruther/guix-local

774bb0f59b0e50f63309b32278a3637f06042ac0 — Nicolas Graves 6 months ago e26a5f5
gnu: glances: Switch to pyproject.

* gnu/packages/python-xyz.scm (glances):
[source]: Switch to git-fetch. Move snippet to <#:phases>.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:phases>: Import former source snippet. Add 'check phase
replacement.
[native-inputs]: Add python-pytest, python-setuptools-next.

Change-Id: I18f1ded40f64fcd640728af778e48666d8d762f0
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 39 insertions(+), 27 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +39 -27
@@ 24917,35 24917,47 @@ numbers, real numbers, mixed types and more, and comes with a shell command

(define-public glances
  (package
  (name "glances")
  (version "4.1.1")
  (source
    (origin
      (method url-fetch)
      (uri (pypi-uri "glances" version))
      (sha256
        (base32 "10yjwbmwv2x4x1n3hr1631m8l6l9w8fa7rnvfz1vmzkjs199ihib"))
      (modules '((guix build utils)))
      (snippet
       '(begin
          ;; Glances phones PyPI for weekly update checks by default.
          ;; Disable these.  The user can re-enable them if desired.
          (substitute* "glances/outdated.py"
            (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
             (string-append indentation
                            "self.args.disable_check_update = True\n"
                            line)))
          #t))))
  (build-system python-build-system)
  (propagated-inputs
   (list python-defusedxml python-orjson python-packaging python-psutil))
  (home-page "https://github.com/nicolargo/glances")
  (synopsis "Cross-platform curses-based monitoring tool")
  (description
    "Glances is a curses-based monitoring tool for a wide variety of platforms.
    (name "glances")
    (version "4.1.1")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/nicolargo/glances")
              (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "00xyixi3wrajmkmqgd1rlaqypi6c1wskm6q0xbrw2k1zc7wi3kxl"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'disable-update-checks
            (lambda _
              ;; Glances phones PyPI for weekly update checks by default.
              ;; Disable these.  The user can re-enable them if desired.
              (substitute* "glances/outdated.py"
                (("^(.*)self\\.load_config\\(config\\)\n" line
                  indentation)
                 (string-append indentation
                                "self.args.disable_check_update = True\n"
                                line)))))
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
                ;; XXX: Taken from tox.ini.
                (invoke "python" "unittest-core.py")))))))
    (native-inputs (list python-pytest python-setuptools-next))
    (propagated-inputs (list python-defusedxml python-orjson python-packaging
                             python-psutil))
    (home-page "https://github.com/nicolargo/glances")
    (synopsis "Cross-platform curses-based monitoring tool")
    (description
     "Glances is a curses-based monitoring tool for a wide variety of platforms.
     Glances uses the PsUtil library to get information from your system.  It
     monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
  (license license:lgpl3+)))
    (license license:lgpl3+)))

(define-public python-graphql-core
  (package