| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 |
|
| 32 | (define-module (gnu packages python-graphics)
|
| 33 | #:use-module ((guix licenses) #:prefix license:)
|
| 34 | #:use-module (guix build-system pyproject)
|
| 35 | #:use-module (guix download)
|
| 36 | #:use-module (guix gexp)
|
| 37 | #:use-module (guix git-download)
|
| 38 | #:use-module (guix packages)
|
| 39 | #:use-module (gnu packages)
|
| 40 | #:use-module (gnu packages audio)
|
| 41 | #:use-module (gnu packages base)
|
| 42 | #:use-module (gnu packages boost)
|
| 43 | #:use-module (gnu packages check)
|
| 44 | #:use-module (gnu packages cmake)
|
| 45 | #:use-module (gnu packages compression)
|
| 46 | #:use-module (gnu packages fontutils)
|
| 47 | #:use-module (gnu packages game-development)
|
| 48 | #:use-module (gnu packages gl)
|
| 49 | #:use-module (gnu packages graphics)
|
| 50 | #:use-module (gnu packages gstreamer)
|
| 51 | #:use-module (gnu packages gtk)
|
| 52 | #:use-module (gnu packages image)
|
| 53 | #:use-module (gnu packages maths)
|
| 54 | #:use-module (gnu packages pkg-config)
|
| 55 | #:use-module (gnu packages pulseaudio)
|
| 56 | #:use-module (gnu packages python)
|
| 57 | #:use-module (gnu packages python-build)
|
| 58 | #:use-module (gnu packages python-check)
|
| 59 | #:use-module (gnu packages python-web)
|
| 60 | #:use-module (gnu packages python-xyz)
|
| 61 | #:use-module (gnu packages qt)
|
| 62 | #:use-module (gnu packages sdl)
|
| 63 | #:use-module (gnu packages simulation)
|
| 64 | #:use-module (gnu packages swig)
|
| 65 | #:use-module (gnu packages video)
|
| 66 | #:use-module (gnu packages xorg))
|
| 67 |
|
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 |
|
| 77 | (define-public python-asyncgui
|
| 78 | (package
|
| 79 | (name "python-asyncgui")
|
| 80 | (version "0.8.0")
|
| 81 | (source
|
| 82 | (origin
|
| 83 | (method git-fetch) |
| 84 | (uri (git-reference
|
| 85 | (url "https://github.com/asyncgui/asyncgui")
|
| 86 | (commit version)))
|
| 87 | (file-name (git-file-name name version))
|
| 88 | (sha256
|
| 89 | (base32 "1b074msb580wify2wag3swm3s21x23kckxpw974y6dibsmrfr5n3"))))
|
| 90 | (build-system pyproject-build-system)
|
| 91 | (native-inputs
|
| 92 | (list python-poetry-core
|
| 93 | python-pytest))
|
| 94 | (home-page "https://github.com/asyncgui/asyncgui")
|
| 95 | (synopsis "Enables async/await without an event loop")
|
| 96 | (description
|
| 97 | "This package provides support for async/await applications without
|
| 98 | requiring an event loop, useful for creative responsive GUIs.")
|
| 99 | (license license:expat)))
|
| 100 |
|
| 101 | (define-public python-asynckivy
|
| 102 | (package
|
| 103 | (name "python-asynckivy")
|
| 104 | (version "0.8.1")
|
| 105 | (source
|
| 106 | (origin
|
| 107 | (method git-fetch) |
| 108 | (uri (git-reference
|
| 109 | (url "https://github.com/asyncgui/asynckivy")
|
| 110 | (commit version)))
|
| 111 | (file-name (git-file-name name version))
|
| 112 | (sha256
|
| 113 | (base32 "0gjddv6d7bbjymvly2x5zaay1gyihls1c4bh7y1ppbvz15152lkj"))))
|
| 114 | (build-system pyproject-build-system)
|
| 115 | (arguments
|
| 116 | (list
|
| 117 | #:phases
|
| 118 | #~(modify-phases %standard-phases
|
| 119 | (add-before 'check 'set-home
|
| 120 | (lambda _
|
| 121 | |
| 122 | (setenv "HOME" "/tmp"))))))
|
| 123 | (native-inputs
|
| 124 | (list python-poetry-core
|
| 125 | python-pytest))
|
| 126 | (propagated-inputs
|
| 127 | (list python-kivy
|
| 128 | python-asyncgui))
|
| 129 | (home-page "https://github.com/asyncgui/asynckivy")
|
| 130 | (synopsis "Async library for Kivy")
|
| 131 | (description
|
| 132 | "This package provides async versions of Kivy functions to avoid the
|
| 133 | callback-heavy mode of interaction typical in some Kivy applications.")
|
| 134 | (license license:expat)))
|
| 135 |
|
| 136 | (define-public python-glcontext
|
| 137 | (let ( |
| 138 | |
| 139 | (revision "2")
|
| 140 | (commit "f2875abdb18b24e785c3958cc22845c81725d5cd"))
|
| 141 | (package
|
| 142 | (name "python-glcontext")
|
| 143 | (version (git-version "3.0.0" revision commit))
|
| 144 | (source
|
| 145 | (origin
|
| 146 | (method git-fetch)
|
| 147 | (uri (git-reference
|
| 148 | (url "https://github.com/moderngl/glcontext")
|
| 149 | (commit commit)))
|
| 150 | (file-name (git-file-name name version))
|
| 151 | (sha256
|
| 152 | (base32 "15pngnc4agdvm8crq782vjlb5v1qrclln5xpqiyhz3jhmipsqb8q"))))
|
| 153 | (build-system pyproject-build-system)
|
| 154 | (arguments
|
| 155 | (list
|
| 156 | #:phases
|
| 157 | #~(modify-phases %standard-phases
|
| 158 | (add-before 'build 'fix-lib-paths
|
| 159 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 160 | (let ((mesa (assoc-ref inputs "mesa"))
|
| 161 | (libx11 (assoc-ref inputs "libx11")))
|
| 162 | (substitute* '("glcontext/x11.cpp"
|
| 163 | "glcontext/egl.cpp")
|
| 164 | (("\"libGL.so\"")
|
| 165 | (string-append "\"" mesa "/lib/libGL.so\""))
|
| 166 | (("\"libEGL.so\"")
|
| 167 | (string-append "\"" mesa "/lib/libEGL.so\""))
|
| 168 | (("\"libX11.so\"")
|
| 169 | (string-append "\"" libx11 "/lib/libX11.so\"")))
|
| 170 | (substitute* '("glcontext/__init__.py")
|
| 171 | (("find_library\\('GL'\\)")
|
| 172 | (string-append "'" mesa "/lib/libGL.so'"))
|
| 173 | (("find_library\\('EGL'\\)")
|
| 174 | (string-append "'" mesa "/lib/libEGL.so'"))
|
| 175 | (("find_library\\(\"X11\"\\)")
|
| 176 | (string-append "'" libx11 "/lib/libX11.so'"))))))
|
| 177 | (add-before 'check 'prepare-test-environment
|
| 178 | (lambda _
|
| 179 | (system "Xvfb :1 &")
|
| 180 | (setenv "DISPLAY" ":1"))))))
|
| 181 | (inputs
|
| 182 | (list libx11
|
| 183 | mesa))
|
| 184 | (native-inputs
|
| 185 | (list python-psutil
|
| 186 | python-pytest
|
| 187 | python-setuptools
|
| 188 | python-wheel
|
| 189 | xorg-server-for-tests))
|
| 190 | (home-page "https://github.com/moderngl/glcontext")
|
| 191 | (synopsis "Portable OpenGL Context for ModernGL")
|
| 192 | (description
|
| 193 | "Python-glcontext is a library providing an OpenGL implementation for
|
| 194 | ModernGL on multiple platforms.")
|
| 195 | (license license:expat))))
|
| 196 |
|
| 197 | (define-public python-glfw
|
| 198 | (package
|
| 199 | (name "python-glfw")
|
| 200 | (version "2.8.0")
|
| 201 | (source
|
| 202 | (origin
|
| 203 | (method url-fetch)
|
| 204 | (uri (pypi-uri "glfw" version))
|
| 205 | (sha256
|
| 206 | (base32 "1w36jvn6fx8p7irhwj6bbl67m2id3s0227b3w7bgw9hbicr0vsch"))))
|
| 207 | (build-system pyproject-build-system)
|
| 208 | (arguments
|
| 209 | (list
|
| 210 | #:tests? #f |
| 211 | #:phases
|
| 212 | #~(modify-phases %standard-phases
|
| 213 | (add-after 'unpack 'fix-lib-paths
|
| 214 | (lambda _
|
| 215 | (substitute* "glfw/library.py"
|
| 216 | (("_get_library_search_paths\\(\\), ")
|
| 217 | (format #f "[ '~a/lib' ],"
|
| 218 | #$(this-package-input "glfw")))))))))
|
| 219 | (native-inputs
|
| 220 | (list python-pytest
|
| 221 | python-setuptools
|
| 222 | python-wheel))
|
| 223 | (inputs
|
| 224 | (list glfw))
|
| 225 | (home-page "https://github.com/FlorianRhiem/pyGLFW")
|
| 226 | (synopsis "Python bindings for GLFW")
|
| 227 | (description
|
| 228 | "This package provides Python bindings for @url{http://www.glfw.org/,
|
| 229 | GLFW} OpenGL application development library.")
|
| 230 | (license license:expat)))
|
| 231 |
|
| 232 | (define-public python-kivy
|
| 233 | (package
|
| 234 | (name "python-kivy")
|
| 235 | |
| 236 | (properties '((commit . "c38d019ed96a7f50db628975fbe944ea8b3cf66d")
|
| 237 | (revision . "0")))
|
| 238 | (version (git-version "2.3.1"
|
| 239 | (assoc-ref properties 'revision)
|
| 240 | (assoc-ref properties 'commit)))
|
| 241 | (source
|
| 242 | (origin
|
| 243 | (method git-fetch)
|
| 244 | (uri (git-reference
|
| 245 | (url "https://github.com/kivy/kivy")
|
| 246 | (commit (assoc-ref properties 'commit))))
|
| 247 | (file-name (git-file-name name version))
|
| 248 | (sha256
|
| 249 | (base32 "1f415556ykydqxxjnnc496j81xd2bvkwk5d5m8wlmfad0wkn3nrb"))))
|
| 250 | (build-system pyproject-build-system)
|
| 251 | (arguments
|
| 252 | `(#:tests? #f |
| 253 | #:phases
|
| 254 | (modify-phases %standard-phases
|
| 255 | (add-after 'patch-generated-file-shebangs 'set-sdl-paths
|
| 256 | (lambda* (#:key inputs #:allow-other-keys)
|
| 257 | (setenv "KIVY_SDL2_PATH"
|
| 258 | (search-input-directory inputs "/include/SDL2"))))
|
| 259 | (add-before 'build 'set-home
|
| 260 | (lambda _
|
| 261 | |
| 262 | (setenv "HOME" (getcwd)))))))
|
| 263 | (native-inputs
|
| 264 | (list pkg-config
|
| 265 | python-cython
|
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | python-packaging
|
| 274 | python-setuptools))
|
| 275 | (inputs
|
| 276 | (list gstreamer
|
| 277 | mesa
|
| 278 | (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
|
| 279 | (propagated-inputs
|
| 280 | (list python-docutils
|
| 281 | python-filetype
|
| 282 | python-kivy-garden
|
| 283 | python-pygments
|
| 284 | python-requests))
|
| 285 | (home-page "https://kivy.org")
|
| 286 | (synopsis "Multitouch application framework")
|
| 287 | (description
|
| 288 | "Kivy is a software library for rapid development of hardware-accelerated
|
| 289 | multitouch applications.")
|
| 290 | (license license:expat)))
|
| 291 |
|
| 292 | (define-public python-kivymd
|
| 293 | (package
|
| 294 | (name "python-kivymd")
|
| 295 | (version "1.1.1")
|
| 296 | (source
|
| 297 | (origin
|
| 298 | (method git-fetch) |
| 299 | (uri (git-reference
|
| 300 | (url "https://github.com/kivymd/KivyMD")
|
| 301 | (commit version)))
|
| 302 | (file-name (git-file-name name version))
|
| 303 | (sha256
|
| 304 | (base32 "1nprldcm54qybbwf7zlb32fkmz375j8i3k3g41d6ykc6vasq3w5j"))))
|
| 305 | (build-system pyproject-build-system)
|
| 306 | (arguments
|
| 307 | (list
|
| 308 | #:test-flags
|
| 309 | |
| 310 | |
| 311 | #~(list "--ignore=kivymd/tests/pyinstaller"
|
| 312 | "-k" (string-join
|
| 313 | |
| 314 | |
| 315 | |
| 316 | (list "not test_backdrop_raw_app"
|
| 317 | "test_bottom_navigation_m3_style_raw_app"
|
| 318 | "test_card_m3_style_raw_app"
|
| 319 | "test_chip_raw_app"
|
| 320 | "test_imagelist_raw_app"
|
| 321 | "test_list_raw_app"
|
| 322 | "test_navigationdrawer_raw_app"
|
| 323 | "test_tab_raw_app"
|
| 324 | "test_textfield_raw_app")
|
| 325 | " and not "))
|
| 326 | #:phases
|
| 327 | #~(modify-phases %standard-phases
|
| 328 | (add-after 'unpack 'fix-modules
|
| 329 | (lambda _
|
| 330 | (substitute* "setup.py"
|
| 331 | |
| 332 | |
| 333 | (("\"kivymd.tools.release\"") ""))
|
| 334 | |
| 335 | (with-output-to-file "kivymd/tests/__init__.py"
|
| 336 | (lambda _ (display "")))))
|
| 337 | (add-before 'build 'set-home
|
| 338 | (lambda _
|
| 339 | |
| 340 | |
| 341 | (setenv "HOME" "/tmp"))))))
|
| 342 | (native-inputs
|
| 343 | (list python-docutils
|
| 344 | python-pytest
|
| 345 | python-pytest-asyncio
|
| 346 | python-setuptools
|
| 347 | python-wheel))
|
| 348 | (propagated-inputs
|
| 349 | (list python-kivy
|
| 350 | python-pillow
|
| 351 | python-pygments
|
| 352 | python-kivy-garden))
|
| 353 | (home-page "https://github.com/kivymd/KivyMD")
|
| 354 | (synopsis "Material Design compliant widgets for use with Kivy")
|
| 355 | (description
|
| 356 | "This package provides Kivy widgets that approximate Google's Material
|
| 357 | Design spec without sacrificing ease of use or application performance.")
|
| 358 | (license license:expat)))
|
| 359 |
|
| 360 | (define-public python-pivy
|
| 361 | (package
|
| 362 | (name "python-pivy")
|
| 363 | (version "0.6.11")
|
| 364 | (source
|
| 365 | (origin
|
| 366 | (method git-fetch)
|
| 367 | (uri (git-reference
|
| 368 | (url "https://github.com/coin3d/pivy")
|
| 369 | (commit version)))
|
| 370 | (file-name (git-file-name name version))
|
| 371 | (sha256
|
| 372 | (base32 "0rjbhhxyrh0fszc0va7qmkv6ayf2s49ppnw31p51xmq63bx3n5wc"))))
|
| 373 | (build-system pyproject-build-system)
|
| 374 | (arguments
|
| 375 | (list
|
| 376 | |
| 377 | #:tests? #f
|
| 378 | #:phases
|
| 379 | #~(modify-phases %standard-phases
|
| 380 | (add-after 'unpack 'patch-cmake-include-dirs
|
| 381 | (lambda _
|
| 382 | |
| 383 | (substitute* "CMakeLists.txt"
|
| 384 | (("\\$\\{SoQt_INCLUDE_DIRS}")
|
| 385 | "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}")))))))
|
| 386 | (native-inputs
|
| 387 | (list cmake-minimal
|
| 388 | python-setuptools
|
| 389 | swig-4.4))
|
| 390 | (inputs
|
| 391 | (list qtbase
|
| 392 | libxi
|
| 393 | libice
|
| 394 | glew
|
| 395 | coin3d))
|
| 396 | (home-page "https://github.com/coin3d/pivy")
|
| 397 | (synopsis "Python bindings to Coin3D")
|
| 398 | (description
|
| 399 | "Pivy provides python bindings for Coin, a 3D graphics library with an
|
| 400 | Application Programming Interface based on the Open Inventor 2.1 API.")
|
| 401 | (license license:isc)))
|
| 402 |
|
| 403 | (define-public python-py3exiv2
|
| 404 | (package
|
| 405 | (name "python-py3exiv2")
|
| 406 | (version "0.12.0")
|
| 407 | (source
|
| 408 | (origin
|
| 409 | (method url-fetch)
|
| 410 | |
| 411 | (uri (pypi-uri "py3exiv2" version))
|
| 412 | (sha256
|
| 413 | (base32 "12is7xb393wvq3la9lhi0y1xkmpvjj6v13cikb7k6iqcfrgkxckj"))))
|
| 414 | (build-system pyproject-build-system)
|
| 415 | (arguments
|
| 416 | (list #:tests? #f)) |
| 417 | (native-inputs
|
| 418 | (list boost
|
| 419 | python-setuptools))
|
| 420 | (inputs
|
| 421 | (list exiv2))
|
| 422 | (home-page "https://www.py3exiv2.tuxfamily.org/")
|
| 423 | (synopsis "Python binding to the exiv2 library")
|
| 424 | (description
|
| 425 | "This package provides a Python binding to the library
|
| 426 | @code{https://exiv2.org/, exiv2} - cross-platform C++ library and a command
|
| 427 | line utility to manage image metadata.")
|
| 428 | (license license:gpl3+)))
|
| 429 |
|
| 430 | (define-public python-pyglet
|
| 431 | (package
|
| 432 | (name "python-pyglet")
|
| 433 | (version "2.0.18")
|
| 434 | (source
|
| 435 | (origin
|
| 436 | (method url-fetch)
|
| 437 | (uri (pypi-uri "pyglet" version))
|
| 438 | (sha256
|
| 439 | (base32 "1p4rizj81vfqxal288m3afbrgk0il3w7k5kmhai2sah8f26j7ybw"))))
|
| 440 | (build-system pyproject-build-system)
|
| 441 | (arguments
|
| 442 | (list
|
| 443 | #:test-flags
|
| 444 | #~(list "tests"
|
| 445 | "--ignore=tests/interactive"
|
| 446 | |
| 447 | "--ignore=tests/integration/media/test_openal.py"
|
| 448 | "--ignore=tests/integration/text/test_empty_document.py"
|
| 449 | |
| 450 | "-k" (string-append "not test2"
|
| 451 | " and not test5"
|
| 452 | " and not testPad"
|
| 453 | " and not testPad"
|
| 454 | " and not testRange"
|
| 455 | " and not testRect"
|
| 456 | " and not testRect"
|
| 457 | " and not testSet"
|
| 458 | " and not testSquare"
|
| 459 | " and not testSquare"
|
| 460 | " and not testTuple"
|
| 461 | " and not testTupleRange"
|
| 462 | " and not test_context_noshare_texture"
|
| 463 | " and not test_context_share_texture"
|
| 464 | " and not test_method"
|
| 465 | " and not test_openal_listener"
|
| 466 | " and not test_parse_all_controller_mappings"
|
| 467 | " and not test_player_play"
|
| 468 | " and not test_player_play_multiple"
|
| 469 | " and not test_stream_write_needed"
|
| 470 | " and not test_window_caption"
|
| 471 | " and not test_window_caption_from_argv"))
|
| 472 | #:phases
|
| 473 | #~(modify-phases %standard-phases
|
| 474 | (add-after 'unpack 'patch-lib-paths
|
| 475 | (lambda* (#:key inputs #:allow-other-keys)
|
| 476 | (substitute* (list "pyglet/font/fontconfig.py"
|
| 477 | "pyglet/font/freetype_lib.py"
|
| 478 | "pyglet/gl/lib_glx.py"
|
| 479 | "pyglet/input/linux/evdev.py"
|
| 480 | "pyglet/libs/egl/egl.py"
|
| 481 | "pyglet/libs/egl/lib.py"
|
| 482 | "pyglet/libs/x11/xf86vmode.py"
|
| 483 | "pyglet/libs/x11/xinerama.py"
|
| 484 | "pyglet/libs/x11/xlib.py"
|
| 485 | "pyglet/libs/x11/xsync.py"
|
| 486 | "pyglet/media/drivers/openal/lib_openal.py"
|
| 487 | "pyglet/media/drivers/pulse/lib_pulseaudio.py")
|
| 488 | (("'EGL'")
|
| 489 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 490 | "lib/libEGL.so"))
|
| 491 | (("\"fontconfig\"")
|
| 492 | (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal")
|
| 493 | "lib/libfontconfig.so"))
|
| 494 | (("\"freetype\"")
|
| 495 | (format #f "'~a/~a'" #$(this-package-input "freetype")
|
| 496 | "lib/libfreetype.so"))
|
| 497 | (("'GL'")
|
| 498 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 499 | "lib/libGL.so"))
|
| 500 | (("'GLU'")
|
| 501 | (format #f "'~a/~a'" #$(this-package-input "glu")
|
| 502 | "lib/libGLU.so"))
|
| 503 | (("'X11'")
|
| 504 | (format #f "'~a/~a'" #$(this-package-input "libx11")
|
| 505 | "lib/libX11.so"))
|
| 506 | (("'Xext'")
|
| 507 | (format #f "'~a/~a'" #$(this-package-input "libxext")
|
| 508 | "lib/libXext.so"))
|
| 509 | (("'Xinerama'")
|
| 510 | (format #f "'~a/~a'" #$(this-package-input "libxinerama")
|
| 511 | "lib/libXinerama.so"))
|
| 512 | (("'Xxf86vm'")
|
| 513 | (format #f "'~a/~a'" #$(this-package-input "libxxf86vm")
|
| 514 | "lib/libXxf86vm.so"))
|
| 515 | (("'c'")
|
| 516 | (format #f "'~a/~a'" #$(this-package-input "glibc")
|
| 517 | "lib/libc.so"))
|
| 518 | (("'gdk-x11-2.0'")
|
| 519 | (format #f "'~a/~a'" #$(this-package-input "gtk+")
|
| 520 | "lib/gdk-pixbuf-2.0.so"))
|
| 521 | (("'gdk_pixbuf-2.0'")
|
| 522 | (format #f "'~a/~a'" #$(this-package-input "gdk-pixbuf")
|
| 523 | "lib/libgdk_pixbuf-2.0.so"))
|
| 524 | (("'openal'")
|
| 525 | (format #f "'~a/~a'" #$(this-package-input "openal")
|
| 526 | "lib/libopenal.so"))
|
| 527 | (("'pulse'")
|
| 528 | (format #f "'~a/~a'" #$(this-package-input "pulseaudio")
|
| 529 | "lib/libpulse.so")))))
|
| 530 | (add-before 'check 'prepare-test-environment
|
| 531 | (lambda _
|
| 532 | |
| 533 | (system "Xvfb :1 &")
|
| 534 | (setenv "DISPLAY" ":1")
|
| 535 | (setenv "HOME" "/tmp")
|
| 536 | (setenv "PYGLET_HEADLESS" "True"))))))
|
| 537 | (native-inputs
|
| 538 | (list python-flit-core
|
| 539 | python-pytest
|
| 540 | unzip
|
| 541 | xorg-server-for-tests))
|
| 542 | (inputs
|
| 543 | (list ffmpeg
|
| 544 | fontconfig
|
| 545 | freeglut
|
| 546 | freetype
|
| 547 | gdk-pixbuf
|
| 548 | glibc
|
| 549 | glu
|
| 550 | gtk+
|
| 551 | libx11
|
| 552 | libxext
|
| 553 | libxinerama
|
| 554 | libxxf86vm
|
| 555 | mesa
|
| 556 | openal
|
| 557 | pulseaudio))
|
| 558 | (home-page "https://github.com/pyglet/pyglet")
|
| 559 | (synopsis "Windowing and multimedia library")
|
| 560 | (description
|
| 561 | "Pyglet is a Python library for developing games and other visually-rich
|
| 562 | applications. It supports windowing, user interface event handling,
|
| 563 | Joysticks, OpenGL graphics, loading images and videos, playing sounds and
|
| 564 | music." )
|
| 565 | (license license:bsd-3)))
|
| 566 |
|
| 567 | (define-public python-pyglet-1
|
| 568 | (package
|
| 569 | (inherit python-pyglet)
|
| 570 | (name "python-pyglet")
|
| 571 | (version "1.5.30") |
| 572 | (source
|
| 573 | (origin
|
| 574 | (method git-fetch)
|
| 575 | (uri (git-reference
|
| 576 | (url "https://github.com/pyglet/pyglet")
|
| 577 | (commit (string-append "v" version))))
|
| 578 | (file-name (git-file-name name version))
|
| 579 | (sha256
|
| 580 | (base32 "0q1690pqkks3na6vc8ps44h0gymlmq752xlk7fm0yvz05yqdqn51"))))
|
| 581 | (arguments
|
| 582 | (list
|
| 583 | |
| 584 | #:test-flags
|
| 585 | #~(list "--ignore=tests/base"
|
| 586 | "--ignore=tests/interactive"
|
| 587 | "--ignore=tests/integration/media"
|
| 588 | "--ignore=tests/integration/font"
|
| 589 | "--ignore=tests/integration/platform/test_linux_fontconfig.py"
|
| 590 | |
| 591 | |
| 592 | "--ignore=tests/integration/window/test_event_sequence.py"
|
| 593 | |
| 594 | |
| 595 | "--deselect=tests/unit/media/test_listener.py::test_openal_listener")
|
| 596 | #:phases
|
| 597 | #~(modify-phases %standard-phases
|
| 598 | (add-after 'unpack 'fix-python-3.12-incompatibility
|
| 599 | |
| 600 | |
| 601 | (lambda _
|
| 602 | (substitute* "tests/integration/test_toplevel_imports.py"
|
| 603 | (("import imp") ""))))
|
| 604 | (add-after 'unpack 'patch-lib-paths
|
| 605 | (lambda* (#:key inputs #:allow-other-keys)
|
| 606 | (substitute* (list "pyglet/font/fontconfig.py"
|
| 607 | "pyglet/font/freetype_lib.py"
|
| 608 | "pyglet/gl/lib_glx.py"
|
| 609 | "pyglet/libs/egl/egl.py"
|
| 610 | "pyglet/libs/egl/lib.py"
|
| 611 | "pyglet/libs/x11/xf86vmode.py"
|
| 612 | "pyglet/libs/x11/xinerama.py"
|
| 613 | "pyglet/libs/x11/xlib.py"
|
| 614 | "pyglet/libs/x11/xsync.py"
|
| 615 | "pyglet/media/drivers/openal/lib_openal.py"
|
| 616 | "pyglet/media/drivers/pulse/lib_pulseaudio.py")
|
| 617 | (("'EGL'")
|
| 618 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 619 | "lib/libEGL.so"))
|
| 620 | (("'fontconfig'")
|
| 621 | (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal")
|
| 622 | "lib/libfontconfig.so"))
|
| 623 | (("'freetype'")
|
| 624 | (format #f "'~a/~a'" #$(this-package-input "freetype")
|
| 625 | "lib/libfreetype.so"))
|
| 626 | (("'GL'")
|
| 627 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 628 | "lib/libGL.so"))
|
| 629 | (("'GLU'")
|
| 630 | (format #f "'~a/~a'" #$(this-package-input "glu")
|
| 631 | "lib/libGLU.so"))
|
| 632 | (("'X11'")
|
| 633 | (format #f "'~a/~a'" #$(this-package-input "libx11")
|
| 634 | "lib/libX11.so"))
|
| 635 | (("'Xext'")
|
| 636 | (format #f "'~a/~a'" #$(this-package-input "libxext")
|
| 637 | "lib/libXext.so"))
|
| 638 | (("'Xinerama'")
|
| 639 | (format #f "'~a/~a'" #$(this-package-input "libxinerama")
|
| 640 | "lib/libXinerama.so"))
|
| 641 | (("'Xxf86vm'")
|
| 642 | (format #f "'~a/~a'" #$(this-package-input "libxxf86vm")
|
| 643 | "lib/libXxf86vm.so"))
|
| 644 | (("'c'")
|
| 645 | (format #f "'~a/~a'" #$(this-package-input "glibc")
|
| 646 | "lib/libc.so"))
|
| 647 | (("'gdk-x11-2.0'")
|
| 648 | (format #f "'~a/~a'" #$(this-package-input "gtk+")
|
| 649 | "lib/gdk-pixbuf-2.0.so"))
|
| 650 | (("'gdk_pixbuf-2.0'")
|
| 651 | (format #f "'~a/~a'" #$(this-package-input "gdk-pixbuf")
|
| 652 | "lib/libgdk_pixbuf-2.0.so"))
|
| 653 | (("'openal'")
|
| 654 | (format #f "'~a/~a'" #$(this-package-input "openal")
|
| 655 | "lib/libopenal.so"))
|
| 656 | (("'pulse'")
|
| 657 | (format #f "'~a/~a'" #$(this-package-input "pulseaudio")
|
| 658 | "lib/libpulse.so")))))
|
| 659 | (add-before 'check 'prepare-test-environment
|
| 660 | (lambda _
|
| 661 | |
| 662 | (system "Xvfb :1 &")
|
| 663 | (setenv "DISPLAY" ":1")
|
| 664 | (setenv "HOME" "/tmp")
|
| 665 | (setenv "PYGLET_HEADLESS" "True"))))))
|
| 666 | (native-inputs
|
| 667 | (list python-pytest
|
| 668 | python-setuptools
|
| 669 | xorg-server-for-tests))))
|
| 670 |
|
| 671 | (define-public python-pyopengl
|
| 672 | (package
|
| 673 | (name "python-pyopengl")
|
| 674 | (version "3.1.10")
|
| 675 | (source
|
| 676 | (origin
|
| 677 | (method git-fetch)
|
| 678 | (uri (git-reference
|
| 679 | (url "https://github.com/mcfletch/pyopengl")
|
| 680 | (commit version)))
|
| 681 | (file-name (git-file-name name version))
|
| 682 | (sha256
|
| 683 | (base32 "0gn6n6z76xrvwj9inl2v6rr707n1w8s072qxfmzpla1i9bfckzjk"))))
|
| 684 | (build-system pyproject-build-system)
|
| 685 | (arguments
|
| 686 | (list
|
| 687 | |
| 688 | #:test-flags
|
| 689 | #~(list #$@(map (lambda (test) (string-append "--deselect=tests/" test))
|
| 690 | (list
|
| 691 | |
| 692 | "test_checks.py::test_check_crash_on_glutinit"
|
| 693 | "test_checks.py::test_check_egl_es1"
|
| 694 | "test_checks.py::test_check_egl_es2"
|
| 695 | "test_checks.py::test_check_egl_opengl"
|
| 696 | "test_checks.py::test_check_glutwindow"
|
| 697 | "test_checks.py::test_check_freeglut_deinit"
|
| 698 | "test_checks.py::test_check_glut_debug"
|
| 699 | "test_checks.py::test_check_glut_fc"
|
| 700 | "test_checks.py::test_check_glut_load"
|
| 701 | "test_checks.py::test_check_glutinit"
|
| 702 | "test_checks.py::test_check_glutinit_0args"
|
| 703 | "test_checks.py::test_check_glutinit_single"
|
| 704 | "test_checks.py::test_check_glutinit_simplest"
|
| 705 | "test_checks.py::test_egl_ext_enumerate"
|
| 706 | "test_checks.py::test_test_instanced_draw_detect"
|
| 707 | "test_checks.py::test_test_gldouble_ctypes"
|
| 708 | |
| 709 | |
| 710 | "test_arraydatatype.py::TestCoreDatatype::test_numpyConversion"
|
| 711 | "test_arraydatatype.py::TestCoreDatatype::test_pointers"
|
| 712 | "test_core.py::TestCore::test_glCallLists_twice2"
|
| 713 | "test_core.py::TestCore::test_glmultidraw"
|
| 714 | |
| 715 | "test_checks.py::test_feedbackvarying"
|
| 716 | "test_checks.py::test_test_sf2946226"
|
| 717 | "test_checks.py::test_test_glgetactiveuniform"
|
| 718 | |
| 719 | |
| 720 | "test_core.py::TestCore::test_get_read_fb_binding"
|
| 721 | "test_core.py::TestCore::test_lookupint"
|
| 722 | |
| 723 | "test_core.py::TestCore::test_get_version")))
|
| 724 | #:phases
|
| 725 | #~(modify-phases %standard-phases
|
| 726 | (add-before 'build 'fix-paths
|
| 727 | (lambda* (#:key inputs #:allow-other-keys)
|
| 728 | (substitute* '("OpenGL/platform/ctypesloader.py")
|
| 729 | (("filenames_to_try = \\[base_name\\]")
|
| 730 | "filenames_to_try = [name]"))
|
| 731 | (substitute* '("OpenGL/platform/glx.py"
|
| 732 | "OpenGL/platform/egl.py"
|
| 733 | "OpenGL/platform/osmesa.py"
|
| 734 | "OpenGL/platform/darwin.py"
|
| 735 | "tests/check_glut_load.py")
|
| 736 | (("\"GLU\",")
|
| 737 | (format #f "~s," (search-input-file inputs "lib/libGLU.so")))
|
| 738 | (("'GLU',")
|
| 739 | (format #f "~s," (search-input-file inputs "lib/libGLU.so")))
|
| 740 | (("\"glut\",")
|
| 741 | (format #f "~s," (search-input-file inputs "lib/libglut.so")))
|
| 742 | (("'glut',")
|
| 743 | (format #f "~s," (search-input-file inputs "lib/libglut.so")))
|
| 744 | (("'(GL|EGL|GLESv1_CM|GLESv2)'" all gl-library)
|
| 745 | (format #f "~s" (search-input-file inputs (string-append
|
| 746 | "lib/lib"
|
| 747 | gl-library ".so"))))
|
| 748 | (("\"(GLESv1_CM|GLESv2)\"" all gl-library)
|
| 749 | (format #f "~s" (search-input-file inputs (string-append
|
| 750 | "lib/lib"
|
| 751 | gl-library ".so")))))))
|
| 752 | (add-before 'check 'pre-check
|
| 753 | (lambda _
|
| 754 | (setenv "LANG" "fr_FR.UTF-8")
|
| 755 | (setenv "LANGUAGE" "fr_FR.UTF-8")
|
| 756 | (setenv "DISPLAY" ":1")
|
| 757 | (setenv "HOME" "/tmp")
|
| 758 | (setenv "USER" "guix")
|
| 759 | (setenv "XDG_RUNTIME_DIR" "/tmp")
|
| 760 | (setenv "XDG_SESSION_ID" "11235813")
|
| 761 | (setenv "XDG_SESSION_PATH" "/tmp")
|
| 762 | (setenv "XDG_SESSION_TYPE" "x11"))))))
|
| 763 | (native-inputs
|
| 764 | (list python-cython
|
| 765 | python-numpy
|
| 766 | python-psutil
|
| 767 | python-pygame-ce
|
| 768 | python-pytest
|
| 769 | python-setuptools))
|
| 770 | (inputs
|
| 771 | (list freeglut
|
| 772 | glu
|
| 773 | mesa))
|
| 774 | (home-page "https://pyopengl.sourceforge.net")
|
| 775 | (synopsis "Standard OpenGL bindings for Python")
|
| 776 | (description
|
| 777 | "PyOpenGL is the most common cross platform Python binding to OpenGL and
|
| 778 | related APIs. The binding is created using the standard @code{ctypes}
|
| 779 | library.")
|
| 780 | (license license:bsd-3)))
|
| 781 |
|
| 782 | (define-public python-pyopengl-accelerate
|
| 783 | (package
|
| 784 | (inherit python-pyopengl)
|
| 785 | (name "python-pyopengl-accelerate")
|
| 786 | (version "3.1.10")
|
| 787 | (source
|
| 788 | (origin
|
| 789 | (method url-fetch)
|
| 790 | (uri (pypi-uri "pyopengl_accelerate" version))
|
| 791 | (sha256
|
| 792 | (base32
|
| 793 | "0waskwvw9mp830bnnxcqd8bkh7a4qbnr0fcjnnw35xx6y21iqxc2"))))
|
| 794 | (arguments
|
| 795 | `(#:tests? #f
|
| 796 | #:phases
|
| 797 | (modify-phases %standard-phases
|
| 798 | (delete 'fix-paths))))
|
| 799 | (synopsis "Acceleration code for PyOpenGL")
|
| 800 | (description
|
| 801 | "This is the Cython-coded accelerator module for PyOpenGL.")))
|
| 802 |
|
| 803 | (define-public python-pysdl2
|
| 804 | (package
|
| 805 | (name "python-pysdl2")
|
| 806 | (version "0.9.17")
|
| 807 | (source
|
| 808 | (origin
|
| 809 | (method url-fetch)
|
| 810 | (uri (pypi-uri "pysdl2" version))
|
| 811 | (sha256
|
| 812 | (base32 "0axm6m3wj8x643zg65g60xdpaxanaqdilvp4yysks4pblh0yzij8"))))
|
| 813 | (build-system pyproject-build-system)
|
| 814 | (arguments
|
| 815 | (list
|
| 816 | #:tests? #f |
| 817 | #:phases
|
| 818 | #~(modify-phases %standard-phases
|
| 819 | (add-after 'unpack 'patch-paths
|
| 820 | (lambda _
|
| 821 | (substitute* "sdl2/dll.py"
|
| 822 | |
| 823 | |
| 824 | (("prepath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
|
| 825 | "prepath = \"system\"")
|
| 826 | (("^import sdl2dll$") "")
|
| 827 | (("postpath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
|
| 828 | "postpath = \"system\"")
|
| 829 | (("DLL\\(.*, os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)\\)")
|
| 830 | (format #f "DLL('SDL2', ['SDL2', 'SDL2-2.0', 'SDL2-2.0.0'], '~a/lib')"
|
| 831 | #$(this-package-input "sdl2"))))
|
| 832 | (substitute* "sdl2/sdlimage.py"
|
| 833 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 834 | (format #f "'~a/~a'" #$(this-package-input "sdl2-image")
|
| 835 | "lib/libSDL2_image.so")))
|
| 836 | (substitute* "sdl2/sdlgfx.py"
|
| 837 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 838 | (format #f "'~a/~a'" #$(this-package-input "sdl2-gfx")
|
| 839 | "lib/libSDL2_gfx.so")))
|
| 840 | (substitute* "sdl2/sdlmixer.py"
|
| 841 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 842 | (format #f "'~a/~a'" #$(this-package-input "sdl2-mixer")
|
| 843 | "lib/libSDL2_mixer.so")))
|
| 844 | (substitute* "sdl2/sdlttf.py"
|
| 845 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 846 | (format #f "'~a/~a'" #$(this-package-input "sdl2-ttf")
|
| 847 | "lib/libSDL2_ttf.so"))))))))
|
| 848 | (native-inputs
|
| 849 | (list python-setuptools
|
| 850 | python-wheel))
|
| 851 | (inputs
|
| 852 | (list sdl2 sdl2-image sdl2-gfx sdl2-mixer sdl2-ttf))
|
| 853 | (home-page "https://github.com/py-sdl/py-sdl2")
|
| 854 | (synopsis "Python bindings around the SDL2 game development library")
|
| 855 | (description
|
| 856 | "PySDL2 is a pure Python wrapper around the
|
| 857 | @code{SDL2},@code{SDL2_mixer}, @code{SDL2_image}, @code{SDL2_ttf}, and
|
| 858 | @code{SDL2_gfx} libraries. Instead of relying on C code, it uses the built-in
|
| 859 | ctypes module to interface with SDL2, and provides simple Python classes and
|
| 860 | wrappers for common SDL2 functionality.")
|
| 861 | (license license:cc0)))
|
| 862 |
|
| 863 | (define-public python-qtawesome
|
| 864 | (package
|
| 865 | (name "python-qtawesome")
|
| 866 | (version "1.4.2")
|
| 867 | (source
|
| 868 | (origin
|
| 869 | (method git-fetch)
|
| 870 | (uri (git-reference
|
| 871 | (url "https://github.com/spyder-ide/qtawesome")
|
| 872 | (commit (string-append "v" version))))
|
| 873 | (file-name (git-file-name name version))
|
| 874 | (sha256
|
| 875 | (base32 "16vjnngg5hjmmbp0c2ikgc88g8q0l44n1w3wa04ga5zfhd1yhyn2"))))
|
| 876 | (build-system pyproject-build-system)
|
| 877 | (arguments
|
| 878 | (list
|
| 879 | #:test-flags
|
| 880 | |
| 881 | #~(list "--ignore" "qtawesome/tests/test_qtawesome.py")
|
| 882 | #:phases
|
| 883 | #~(modify-phases %standard-phases
|
| 884 | (add-before 'check 'setenv
|
| 885 | (lambda _
|
| 886 | (setenv "QT_QPA_PLATFORM" "offscreen"))))))
|
| 887 | (propagated-inputs (list python-qtpy python-pyqt))
|
| 888 | (native-inputs (list python-pytest python-pytest-qt python-setuptools))
|
| 889 | (home-page "https://github.com/spyder-ide/qtawesome")
|
| 890 | (synopsis "FontAwesome icons in PyQt and PySide applications")
|
| 891 | (description
|
| 892 | "@code{FontAwesome} icons in @code{PyQt} and @code{PySide} applications.")
|
| 893 | (license license:expat)))
|
| 894 |
|
| 895 | (define-public python-vispy
|
| 896 | (package
|
| 897 | (name "python-vispy")
|
| 898 | (version "0.14.3")
|
| 899 | (source
|
| 900 | (origin
|
| 901 | (method url-fetch)
|
| 902 | (uri (pypi-uri "vispy" version))
|
| 903 | (sha256
|
| 904 | (base32 "07fkk4bdffn0iq5cprk7ydj978rqc4lvzfcs2vkzgfh8m53vifzg"))))
|
| 905 | (build-system pyproject-build-system)
|
| 906 | (arguments
|
| 907 | (list
|
| 908 | #:test-flags
|
| 909 | |
| 910 | |
| 911 | #~(list "-k" (string-append "not test_read_write_image"
|
| 912 | " and not test_wavefront"
|
| 913 | " and not test_config"))
|
| 914 | #:phases
|
| 915 | #~(modify-phases %standard-phases
|
| 916 | (add-after 'unpack 'patch-library-path
|
| 917 | (lambda _
|
| 918 | (substitute* (list "vispy/ext/egl.py"
|
| 919 | "vispy/ext/fontconfig.py"
|
| 920 | "vispy/gloo/gl/es2.py"
|
| 921 | "vispy/gloo/gl/gl2.py")
|
| 922 | (("ctypes\\.util\\.find_library\\('EGL'\\)")
|
| 923 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 924 | "lib/libEGL.so"))
|
| 925 | (("ctypes\\.util\\.find_library\\('GL'\\)")
|
| 926 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 927 | "lib/libGL.so"))
|
| 928 | (("ctypes\\.util\\.find_library\\('GLESv2'\\)")
|
| 929 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 930 | "lib/libGLESv2.so"))
|
| 931 | (("util\\.find_library\\('fontconfig'\\)")
|
| 932 | (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal")
|
| 933 | "lib/libfontconfig.so")))))
|
| 934 | (add-before 'check 'prepare-test-environment
|
| 935 | (lambda _
|
| 936 | |
| 937 | |
| 938 | |
| 939 | (setenv "HOME" "/tmp")
|
| 940 | (invoke "python" "setup.py" "build_ext" "--inplace"))))))
|
| 941 | (native-inputs
|
| 942 | (list python-cython
|
| 943 | python-pytest
|
| 944 | python-setuptools
|
| 945 | python-setuptools-scm
|
| 946 | python-wheel))
|
| 947 | (inputs
|
| 948 | (list fontconfig
|
| 949 | mesa))
|
| 950 | (propagated-inputs
|
| 951 | (list python-freetype-py
|
| 952 | python-hsluv
|
| 953 | python-kiwisolver
|
| 954 | python-meshio
|
| 955 | python-numpy
|
| 956 | python-packaging
|
| 957 | python-pillow))
|
| 958 | (home-page "http://vispy.org")
|
| 959 | (synopsis "Interactive scientific visualization in Python")
|
| 960 | (description
|
| 961 | "VisPy is a high-performance interactive 2D/3D data visualization library
|
| 962 | leveraging the computational power of modern Graphics Processing Units (GPUs)
|
| 963 | through the OpenGL library to display very large datasets.")
|
| 964 | (license license:bsd-3)))
|
| 965 |
|
| 966 | |
| 967 | |
| 968 | |
| 969 | |