(use-modules
 ((guix licenses) #:prefix license:)
 (guix packages)
 (guix download)
 (gnu packages python-build)
 (guix build-system python)
 (guix build-system pyproject))

(define-public python-find-libpython
  (package
    (name "python-find-libpython")
    (version "0.4.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "find_libpython" version))
       (sha256
        (base32 "1rh3dj81qwl1v7ckni12abgw2hbag79xx4km5lxmdnvx776wvya6"))))
    (build-system pyproject-build-system)
    (native-inputs (list python-setuptools python-wheel))
    (home-page "https://github.com/ktbarrett/find_libpython")
    (synopsis
     "Finds the libpython associated with your environment, wherever it may be hiding")
    (description
     "Finds the libpython associated with your environment, wherever it may be hiding.")
    (license license:expat)))

(define-public python-cocotb
  (package
    (name "python-cocotb")
    (version "1.9.2")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "cocotb" version))
       (sha256
        (base32 "0lhnvfzzfkz41pchf0sg302ssj0bvipcafh861a4xcf13vsymkg4"))))
    (build-system pyproject-build-system)
    (propagated-inputs (list python-find-libpython))
    (native-inputs (list python-setuptools python-wheel))
    (arguments
     `(#:tests? #f))
    (home-page "https://www.cocotb.org")
    (synopsis
     "cocotb is a coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python.")
    (description
     "cocotb is a coroutine based cosimulation library for writing VHDL and Verilog
testbenches in Python.")
    (license license:bsd-3)))

(concatenate-manifests
 (list
  (packages->manifest
   (list python-cocotb))

  (specifications->manifest
   (list
    "python-pytest"
    "python"
    "vhdl-ls"
    "make"))))
