~ruther/guix-local

d6cf748d564de9186ff796092de933d89768bfcd — Sharlatan Hellseher 4 months ago f8ba50a
gnu: python-pynixutil: Build with python-poetry-core.

* gnu/packages/python-xyz.scm (python-pynixutil)[source] <snippet>: Drop
it and ignore test file in <#:test-flags> instead.
[arguments] <test-flags>: Ignore test file requiring Nix.
<phases>: Add 'use-poetry-core.
[native-inputs]: Remove poetry; add python-poetry-core.

Change-Id: I9691533aaff6e5217fe7497056c2b4cab0cf98f4
1 files changed, 24 insertions(+), 13 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +24 -13
@@ 29210,20 29210,31 @@ environments.")
  (package
    (name "python-pynixutil")
    (version "0.5.0")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/nix-community/pynixutil")
                    (commit version)))
              (file-name (git-file-name name version))
              ;; Derivation test uses nix.
              (modules '((guix build utils)))
              (snippet '(delete-file "tests/test_drv.py"))
              (sha256
               (base32
                "1lnspcai7mqpv73bbd8kgyw63fxwgkwvfkl09b2bl5y2g2v7np6m"))))
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/nix-community/pynixutil")
              (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1lnspcai7mqpv73bbd8kgyw63fxwgkwvfkl09b2bl5y2g2v7np6m"))))
    (build-system pyproject-build-system)
    (native-inputs (list poetry python-pytest))
    (arguments
     (list
      #:test-flags
      ;; Tests require nix in the PATH.
      #~(list "--ignore=tests/test_drv.py")
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'use-poetry-core
            (lambda _
              ;; Patch to use the core poetry API.
              (substitute* "pyproject.toml"
                (("poetry.masonry.api") "poetry.core.masonry.api")))))))
    (native-inputs
     (list python-poetry-core
           python-pytest))
    (home-page "https://github.com/nix-community/pynixutil")
    (synopsis "Utility functions for working with data from Nix in Python")
    (description