| 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 |
|
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 |
|
| 42 | (define-module (gnu packages python-graphics)
|
| 43 | #:use-module ((guix licenses) #:prefix license:)
|
| 44 | #:use-module (guix build-system pyproject)
|
| 45 | #:use-module (guix download)
|
| 46 | #:use-module (guix gexp)
|
| 47 | #:use-module (guix git-download)
|
| 48 | #:use-module (guix packages)
|
| 49 | #:use-module (gnu packages)
|
| 50 | #:use-module (gnu packages audio)
|
| 51 | #:use-module (gnu packages base)
|
| 52 | #:use-module (gnu packages boost)
|
| 53 | #:use-module (gnu packages check)
|
| 54 | #:use-module (gnu packages cmake)
|
| 55 | #:use-module (gnu packages compression)
|
| 56 | #:use-module (gnu packages fontutils)
|
| 57 | #:use-module (gnu packages game-development)
|
| 58 | #:use-module (gnu packages gl)
|
| 59 | #:use-module (gnu packages glib)
|
| 60 | #:use-module (gnu packages graphics)
|
| 61 | #:use-module (gnu packages gstreamer)
|
| 62 | #:use-module (gnu packages gtk)
|
| 63 | #:use-module (gnu packages image)
|
| 64 | #:use-module (gnu packages maths)
|
| 65 | #:use-module (gnu packages pkg-config)
|
| 66 | #:use-module (gnu packages pulseaudio)
|
| 67 | #:use-module (gnu packages python)
|
| 68 | #:use-module (gnu packages python-build)
|
| 69 | #:use-module (gnu packages python-check)
|
| 70 | #:use-module (gnu packages python-science)
|
| 71 | #:use-module (gnu packages python-web)
|
| 72 | #:use-module (gnu packages python-xyz)
|
| 73 | #:use-module (gnu packages qt)
|
| 74 | #:use-module (gnu packages sdl)
|
| 75 | #:use-module (gnu packages simulation)
|
| 76 | #:use-module (gnu packages swig)
|
| 77 | #:use-module (gnu packages tex)
|
| 78 | #:use-module (gnu packages video)
|
| 79 | #:use-module (gnu packages xml)
|
| 80 | #:use-module (gnu packages xorg))
|
| 81 |
|
| 82 |
|
| 83 | (define-public python-asyncgui
|
| 84 | (package
|
| 85 | (name "python-asyncgui")
|
| 86 | (version "0.11.1")
|
| 87 | (source
|
| 88 | (origin
|
| 89 | (method git-fetch)
|
| 90 | (uri (git-reference
|
| 91 | (url "https://github.com/asyncgui/asyncgui")
|
| 92 | (commit (string-append "v" version))))
|
| 93 | (file-name (git-file-name name version))
|
| 94 | (sha256
|
| 95 | (base32 "0fcd4gshygwcfpmxb3sas9awp15rv3m3m1gcxdbf2vrbdchdqhgf"))))
|
| 96 | (build-system pyproject-build-system)
|
| 97 | (arguments
|
| 98 | (list
|
| 99 | #:build-backend "poetry.core.masonry.api"))
|
| 100 | (native-inputs
|
| 101 | (list python-poetry-core
|
| 102 | python-pytest))
|
| 103 | (home-page "https://github.com/asyncgui/asyncgui")
|
| 104 | (synopsis "Enables async/await without an event loop")
|
| 105 | (description
|
| 106 | "This package provides support for async/await applications without
|
| 107 | requiring an event loop, useful for creative responsive GUIs.")
|
| 108 | (license license:expat)))
|
| 109 |
|
| 110 | (define-public python-asynckivy
|
| 111 | (package
|
| 112 | (name "python-asynckivy")
|
| 113 | (version "0.11.0")
|
| 114 | (source
|
| 115 | (origin
|
| 116 | (method git-fetch)
|
| 117 | (uri (git-reference
|
| 118 | (url "https://github.com/asyncgui/asynckivy")
|
| 119 | (commit (string-append "v" version))))
|
| 120 | (file-name (git-file-name name version))
|
| 121 | (sha256
|
| 122 | (base32 "0jxij58ax5lpnhhmhvvbf3sa1mdrbpq6kxab9r25lzgsbqjxj62z"))))
|
| 123 | (build-system pyproject-build-system)
|
| 124 | (arguments
|
| 125 | (list
|
| 126 | #:build-backend "poetry.core.masonry.api"
|
| 127 | |
| 128 | |
| 129 | #:tests? #f))
|
| 130 | (native-inputs
|
| 131 | (list python-poetry-core))
|
| 132 | (propagated-inputs
|
| 133 | (list python-asyncgui))
|
| 134 | (home-page "https://github.com/asyncgui/asynckivy")
|
| 135 | (synopsis "Async library for Kivy")
|
| 136 | (description
|
| 137 | "This package provides async versions of Kivy functions to avoid the
|
| 138 | callback-heavy mode of interaction typical in some Kivy applications.")
|
| 139 | (license license:expat)))
|
| 140 |
|
| 141 | (define-public python-glcontext
|
| 142 | (let ( |
| 143 | |
| 144 | (revision "2")
|
| 145 | (commit "f2875abdb18b24e785c3958cc22845c81725d5cd"))
|
| 146 | (package
|
| 147 | (name "python-glcontext")
|
| 148 | (version (git-version "3.0.0" revision commit))
|
| 149 | (source
|
| 150 | (origin
|
| 151 | (method git-fetch)
|
| 152 | (uri (git-reference
|
| 153 | (url "https://github.com/moderngl/glcontext")
|
| 154 | (commit commit)))
|
| 155 | (file-name (git-file-name name version))
|
| 156 | (sha256
|
| 157 | (base32 "15pngnc4agdvm8crq782vjlb5v1qrclln5xpqiyhz3jhmipsqb8q"))))
|
| 158 | (build-system pyproject-build-system)
|
| 159 | (arguments
|
| 160 | (list
|
| 161 | #:phases
|
| 162 | #~(modify-phases %standard-phases
|
| 163 | (add-before 'build 'fix-lib-paths
|
| 164 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 165 | (let ((mesa (assoc-ref inputs "mesa"))
|
| 166 | (libx11 (assoc-ref inputs "libx11")))
|
| 167 | (substitute* '("glcontext/x11.cpp"
|
| 168 | "glcontext/egl.cpp")
|
| 169 | (("\"libGL.so\"")
|
| 170 | (string-append "\"" mesa "/lib/libGL.so\""))
|
| 171 | (("\"libEGL.so\"")
|
| 172 | (string-append "\"" mesa "/lib/libEGL.so\""))
|
| 173 | (("\"libX11.so\"")
|
| 174 | (string-append "\"" libx11 "/lib/libX11.so\"")))
|
| 175 | (substitute* '("glcontext/__init__.py")
|
| 176 | (("find_library\\('GL'\\)")
|
| 177 | (string-append "'" mesa "/lib/libGL.so'"))
|
| 178 | (("find_library\\('EGL'\\)")
|
| 179 | (string-append "'" mesa "/lib/libEGL.so'"))
|
| 180 | (("find_library\\(\"X11\"\\)")
|
| 181 | (string-append "'" libx11 "/lib/libX11.so'"))))))
|
| 182 | (add-before 'check 'prepare-test-environment
|
| 183 | (lambda _
|
| 184 | (system "Xvfb :1 &")
|
| 185 | (setenv "DISPLAY" ":1"))))))
|
| 186 | (inputs
|
| 187 | (list libx11
|
| 188 | mesa))
|
| 189 | (native-inputs
|
| 190 | (list python-psutil
|
| 191 | python-pytest
|
| 192 | python-setuptools
|
| 193 | python-wheel
|
| 194 | xorg-server-for-tests))
|
| 195 | (home-page "https://github.com/moderngl/glcontext")
|
| 196 | (synopsis "Portable OpenGL Context for ModernGL")
|
| 197 | (description
|
| 198 | "Python-glcontext is a library providing an OpenGL implementation for
|
| 199 | ModernGL on multiple platforms.")
|
| 200 | (license license:expat))))
|
| 201 |
|
| 202 | (define-public python-glfw
|
| 203 | (package
|
| 204 | (name "python-glfw")
|
| 205 | (version "2.8.0")
|
| 206 | (source
|
| 207 | (origin
|
| 208 | (method url-fetch)
|
| 209 | (uri (pypi-uri "glfw" version))
|
| 210 | (sha256
|
| 211 | (base32 "1w36jvn6fx8p7irhwj6bbl67m2id3s0227b3w7bgw9hbicr0vsch"))))
|
| 212 | (build-system pyproject-build-system)
|
| 213 | (arguments
|
| 214 | (list
|
| 215 | #:tests? #f |
| 216 | #:phases
|
| 217 | #~(modify-phases %standard-phases
|
| 218 | (add-after 'unpack 'fix-lib-paths
|
| 219 | (lambda _
|
| 220 | (substitute* "glfw/library.py"
|
| 221 | (("_get_library_search_paths\\(\\), ")
|
| 222 | (format #f "[ '~a/lib' ],"
|
| 223 | #$(this-package-input "glfw")))))))))
|
| 224 | (native-inputs
|
| 225 | (list python-pytest
|
| 226 | python-setuptools
|
| 227 | python-wheel))
|
| 228 | (inputs
|
| 229 | (list glfw))
|
| 230 | (home-page "https://github.com/FlorianRhiem/pyGLFW")
|
| 231 | (synopsis "Python bindings for GLFW")
|
| 232 | (description
|
| 233 | "This package provides Python bindings for @url{http://www.glfw.org/,
|
| 234 | GLFW} OpenGL application development library.")
|
| 235 | (license license:expat)))
|
| 236 |
|
| 237 | (define-public python-isosurfaces
|
| 238 | (package
|
| 239 | (name "python-isosurfaces")
|
| 240 | (version "0.1.2")
|
| 241 | (source
|
| 242 | (origin
|
| 243 | (method git-fetch)
|
| 244 | (uri (git-reference
|
| 245 | (url "https://github.com/jared-hughes/isosurfaces")
|
| 246 | (commit (string-append "v" version))))
|
| 247 | (file-name (git-file-name name version))
|
| 248 | (sha256
|
| 249 | (base32 "11rmbx6hfjz14sykcmqasg4akqm31b67v95sxaxcnkpmqqq8kqzz"))))
|
| 250 | (build-system pyproject-build-system)
|
| 251 | (arguments
|
| 252 | (list
|
| 253 | #:tests? #f)) |
| 254 | (native-inputs
|
| 255 | (list python-setuptools))
|
| 256 | (propagated-inputs
|
| 257 | (list python-numpy))
|
| 258 | (home-page "https://github.com/jared-hughes/isosurfaces")
|
| 259 | (synopsis "Construct isolines/isosurfaces over a 2D/3D scalar field")
|
| 260 | (description
|
| 261 | "Construct isolines/isosurfaces of a 2D/3D scalar field defined by a
|
| 262 | function, i.e. curves over which @code{f(x,y)=0} or surfaces over which
|
| 263 | @code{f(x,y,z)=0}. Most similar libraries use marching squares or similar
|
| 264 | over a uniform grid, but this uses a quadtree to avoid wasting time sampling
|
| 265 | many far from the implicit surface.")
|
| 266 | (license license:expat)))
|
| 267 |
|
| 268 | (define-public python-kivy
|
| 269 | (package
|
| 270 | (name "python-kivy")
|
| 271 | |
| 272 | (properties '((commit . "92d2cc2f56453c55ae7913e1a64809df6cc61ae5")
|
| 273 | (revision . "1")))
|
| 274 | (version (git-version "2.3.1"
|
| 275 | (assoc-ref properties 'revision)
|
| 276 | (assoc-ref properties 'commit)))
|
| 277 | (source
|
| 278 | (origin
|
| 279 | (method git-fetch)
|
| 280 | (uri (git-reference
|
| 281 | (url "https://github.com/kivy/kivy")
|
| 282 | (commit (assoc-ref properties 'commit))))
|
| 283 | (file-name (git-file-name name version))
|
| 284 | (sha256
|
| 285 | (base32 "19fk1l061kjmnhm2yl4vym323s53x1p4jfb1armfd4ly5h0ik0m0"))))
|
| 286 | (build-system pyproject-build-system)
|
| 287 | (arguments
|
| 288 | `(#:tests? #f |
| 289 | #:phases
|
| 290 | (modify-phases %standard-phases
|
| 291 | (add-after 'patch-generated-file-shebangs 'set-sdl-paths
|
| 292 | (lambda* (#:key inputs #:allow-other-keys)
|
| 293 | (setenv "KIVY_SDL2_PATH"
|
| 294 | (search-input-directory inputs "/include/SDL2"))))
|
| 295 | (add-before 'build 'set-home
|
| 296 | (lambda _
|
| 297 | |
| 298 | (setenv "HOME" (getcwd)))))))
|
| 299 | (native-inputs
|
| 300 | (list pkg-config
|
| 301 | python-cython
|
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | |
| 308 | |
| 309 | python-packaging
|
| 310 | python-setuptools))
|
| 311 | (inputs
|
| 312 | (list gstreamer
|
| 313 | mesa
|
| 314 | (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))))
|
| 315 | (propagated-inputs
|
| 316 | (list python-docutils
|
| 317 | python-filetype
|
| 318 | python-kivy-garden
|
| 319 | python-pygments
|
| 320 | python-requests))
|
| 321 | (home-page "https://kivy.org")
|
| 322 | (synopsis "Multitouch application framework")
|
| 323 | (description
|
| 324 | "Kivy is a software library for rapid development of hardware-accelerated
|
| 325 | multitouch applications.")
|
| 326 | (license license:expat)))
|
| 327 |
|
| 328 | (define-public python-kivymd
|
| 329 | (package
|
| 330 | (name "python-kivymd")
|
| 331 | (version "1.1.1")
|
| 332 | (source
|
| 333 | (origin
|
| 334 | (method git-fetch) |
| 335 | (uri (git-reference
|
| 336 | (url "https://github.com/kivymd/KivyMD")
|
| 337 | (commit version)))
|
| 338 | (file-name (git-file-name name version))
|
| 339 | (sha256
|
| 340 | (base32 "1nprldcm54qybbwf7zlb32fkmz375j8i3k3g41d6ykc6vasq3w5j"))))
|
| 341 | (build-system pyproject-build-system)
|
| 342 | (arguments
|
| 343 | (list
|
| 344 | #:test-flags
|
| 345 | |
| 346 | |
| 347 | #~(list "--ignore=kivymd/tests/pyinstaller"
|
| 348 | "-k" (string-join
|
| 349 | |
| 350 | |
| 351 | |
| 352 | (list "not test_backdrop_raw_app"
|
| 353 | "test_bottom_navigation_m3_style_raw_app"
|
| 354 | "test_card_m3_style_raw_app"
|
| 355 | "test_chip_raw_app"
|
| 356 | "test_imagelist_raw_app"
|
| 357 | "test_list_raw_app"
|
| 358 | "test_navigationdrawer_raw_app"
|
| 359 | "test_tab_raw_app"
|
| 360 | "test_textfield_raw_app")
|
| 361 | " and not "))
|
| 362 | #:phases
|
| 363 | #~(modify-phases %standard-phases
|
| 364 | (add-after 'unpack 'fix-modules
|
| 365 | (lambda _
|
| 366 | (substitute* "setup.py"
|
| 367 | |
| 368 | |
| 369 | (("\"kivymd.tools.release\"") ""))
|
| 370 | |
| 371 | (with-output-to-file "kivymd/tests/__init__.py"
|
| 372 | (lambda _ (display "")))))
|
| 373 | (add-before 'build 'set-home
|
| 374 | (lambda _
|
| 375 | |
| 376 | |
| 377 | (setenv "HOME" "/tmp"))))))
|
| 378 | (native-inputs
|
| 379 | (list python-docutils
|
| 380 | python-pytest
|
| 381 | python-pytest-asyncio
|
| 382 | python-setuptools
|
| 383 | python-wheel))
|
| 384 | (propagated-inputs
|
| 385 | (list python-kivy
|
| 386 | python-pillow
|
| 387 | python-pygments
|
| 388 | python-kivy-garden))
|
| 389 | (home-page "https://github.com/kivymd/KivyMD")
|
| 390 | (synopsis "Material Design compliant widgets for use with Kivy")
|
| 391 | (description
|
| 392 | "This package provides Kivy widgets that approximate Google's Material
|
| 393 | Design spec without sacrificing ease of use or application performance.")
|
| 394 | (license license:expat)))
|
| 395 |
|
| 396 | |
| 397 | |
| 398 | (define-public python-manim
|
| 399 | (package
|
| 400 | (name "python-manim")
|
| 401 | (version "0.20.1")
|
| 402 | (source
|
| 403 | (origin
|
| 404 | (method git-fetch)
|
| 405 | (uri (git-reference
|
| 406 | (url "https://github.com/ManimCommunity/manim")
|
| 407 | (commit (string-append "v" version))))
|
| 408 | (file-name (git-file-name name version))
|
| 409 | (sha256
|
| 410 | (base32 "1ifgcsz9dhb7qyqsi60q840wqcqfmqxf19r8qlncakziyqlfmwxd"))))
|
| 411 | (build-system pyproject-build-system)
|
| 412 | (arguments
|
| 413 | (list
|
| 414 | #:test-flags
|
| 415 | #~(list "--numprocesses" (number->string (parallel-job-count))
|
| 416 | |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | "-k" "not (opengl or OpenGL)"
|
| 423 | "--ignore=tests/interface/test_commands.py"
|
| 424 | "--ignore=tests/test_logging/test_logging.py")
|
| 425 | #:phases
|
| 426 | #~(modify-phases %standard-phases
|
| 427 | (add-before 'check 'set-x-server
|
| 428 | (lambda _
|
| 429 | (system "Xvfb :1 -screen 0 1024x768x24 &")
|
| 430 | (setenv "DISPLAY" ":1")))
|
| 431 | (add-after 'unpack 'fix-pytest-config
|
| 432 | (lambda _
|
| 433 | (substitute* "pyproject.toml"
|
| 434 | ((" -n auto ") " ")))))))
|
| 435 | (native-inputs
|
| 436 | (list python-hatchling
|
| 437 | python-pytest
|
| 438 | python-pytest-xdist
|
| 439 | (texlive-local-tree
|
| 440 | (list texlive-dvisvgm
|
| 441 | texlive-fontspec
|
| 442 | texlive-preview
|
| 443 | texlive-standalone
|
| 444 | texlive-xcolor))
|
| 445 | xorg-server))
|
| 446 | (propagated-inputs
|
| 447 | (list ffmpeg
|
| 448 | python-av
|
| 449 | python-beautifulsoup4
|
| 450 | python-click
|
| 451 | python-cloup
|
| 452 | python-decorator
|
| 453 | python-isosurfaces
|
| 454 | python-manimpango
|
| 455 | python-mapbox-earcut
|
| 456 | python-moderngl
|
| 457 | python-moderngl-window
|
| 458 | python-networkx
|
| 459 | python-numpy
|
| 460 | python-pillow
|
| 461 | python-pycairo
|
| 462 | python-pydub
|
| 463 | python-pygments
|
| 464 | python-rich
|
| 465 | python-screeninfo
|
| 466 | python-skia-pathops
|
| 467 | python-srt
|
| 468 | python-svgelements
|
| 469 | python-tqdm
|
| 470 | python-typing-extensions
|
| 471 | python-watchdog))
|
| 472 | (home-page "https://www.manim.community/")
|
| 473 | (synopsis "Python animation engine for explanatory math videos")
|
| 474 | (description
|
| 475 | "Manim is a Python library for creating mathematical animations. The
|
| 476 | animations are written as Python code which is based on predefined objects.
|
| 477 | You can make animations with maths formulas (LaTeX-based), simple shapes, 3D
|
| 478 | objects, function graphs and more.")
|
| 479 | (license license:expat)))
|
| 480 |
|
| 481 | (define-public python-mapbox-earcut
|
| 482 | (package
|
| 483 | (name "python-mapbox-earcut")
|
| 484 | (version "2.0.0")
|
| 485 | (source
|
| 486 | (origin
|
| 487 | (method git-fetch)
|
| 488 | (uri (git-reference
|
| 489 | (url "https://github.com/skogler/mapbox_earcut_python")
|
| 490 | (commit (string-append "v" version))))
|
| 491 | (file-name (git-file-name name version))
|
| 492 | (sha256
|
| 493 | (base32 "18mpr453wbfdaa95xsvhqy5vmb311ja59dzi0aizwdf3nwjh75j7"))))
|
| 494 | (build-system pyproject-build-system)
|
| 495 | (native-inputs
|
| 496 | (list python-nanobind
|
| 497 | python-pytest
|
| 498 | python-scikit-build-core))
|
| 499 | (propagated-inputs
|
| 500 | (list python-numpy))
|
| 501 | (home-page "https://github.com/skogler/mapbox_earcut_python")
|
| 502 | (synopsis "Python bindings to the mapbox earcut C++ library")
|
| 503 | (description
|
| 504 | "Python bindings for the C++ implementation of the Mapbox Earcut library,
|
| 505 | which provides very fast and quite robust triangulation of 2D polygons.
|
| 506 |
|
| 507 | The library implements a modified ear slicing algorithm, optimized by z-order
|
| 508 | curve hashing and extended to handle holes, twisted polygons, degeneracies and
|
| 509 | self-intersections in a way that doesn't guarantee correctness of
|
| 510 | triangulation, but attempts to always produce acceptable results for practical
|
| 511 | data like geographical shapes.")
|
| 512 | (license license:isc)))
|
| 513 |
|
| 514 | (define-public python-moderngl
|
| 515 | (package
|
| 516 | (name "python-moderngl")
|
| 517 | (version "5.12.0")
|
| 518 | (source
|
| 519 | (origin
|
| 520 | (method git-fetch)
|
| 521 | (uri (git-reference
|
| 522 | (url "https://github.com/moderngl/moderngl")
|
| 523 | (commit version)))
|
| 524 | (file-name (git-file-name name version))
|
| 525 | (sha256
|
| 526 | (base32 "0gf8cam9m6sz73ndlwz8a5vd0qz06lbww3lgfjcdmla6bwyxjxd5"))))
|
| 527 | (build-system pyproject-build-system)
|
| 528 | (arguments
|
| 529 | (list
|
| 530 | #:test-flags
|
| 531 | #~(list "-k" "not (test_local or test_compute_shader)")))
|
| 532 | (native-inputs
|
| 533 | (list python-numpy
|
| 534 | python-pyopengl
|
| 535 | python-pytest
|
| 536 | python-scipy-minimal
|
| 537 | python-setuptools))
|
| 538 | (propagated-inputs
|
| 539 | (list python-glcontext))
|
| 540 | (home-page "https://github.com/moderngl/moderngl")
|
| 541 | (synopsis "Modern OpenGL binding for Python")
|
| 542 | (description
|
| 543 | "ModernGL is a Python wrapper over OpenGL Core. ModernGL simplifies the
|
| 544 | creation of graphics applications like scientific simulations, games or user
|
| 545 | interfaces. Usually, acquiring in-depth knowledge of OpenGL requires a steep
|
| 546 | learning curve. In contrast, ModernGL is easy to learn and use. ModernGL is
|
| 547 | capable of rendering with high performance and quality, with less code
|
| 548 | written.")
|
| 549 | (license license:expat)))
|
| 550 |
|
| 551 | (define-public python-moderngl-window
|
| 552 | (package
|
| 553 | (name "python-moderngl-window")
|
| 554 | (version "3.1.1")
|
| 555 | (source
|
| 556 | (origin
|
| 557 | (method git-fetch)
|
| 558 | (uri (git-reference
|
| 559 | (url "https://github.com/moderngl/moderngl-window")
|
| 560 | (commit version)))
|
| 561 | (file-name (git-file-name name version))
|
| 562 | (sha256
|
| 563 | (base32 "1f5mnm1c92ssn7hww40k5yyz4r6b1d5xb2i9y99mcrjv6g1m4jd4"))))
|
| 564 | (build-system pyproject-build-system)
|
| 565 | (arguments
|
| 566 | (list
|
| 567 | #:phases
|
| 568 | #~(modify-phases %standard-phases
|
| 569 | (add-before 'check 'set-x-server
|
| 570 | (lambda _
|
| 571 | (system "Xvfb :1 &")
|
| 572 | (setenv "DISPLAY" ":1"))))))
|
| 573 | (native-inputs
|
| 574 | (list python-pytest
|
| 575 | python-pywavefront
|
| 576 | python-setuptools
|
| 577 | python-trimesh
|
| 578 | xorg-server-for-tests))
|
| 579 | (propagated-inputs
|
| 580 | (list python-moderngl
|
| 581 | python-numpy
|
| 582 | python-pillow
|
| 583 | python-pyglet
|
| 584 | python-pyglm))
|
| 585 | (home-page "https://github.com/moderngl/moderngl_window")
|
| 586 | (synopsis "Helper library for ModernGL making window simple")
|
| 587 | (description
|
| 588 | "Cross platform utility library for ModernGL making window creation and
|
| 589 | resource loading simple. It can also be used with PyOpenGL for rendering with
|
| 590 | the programmable pipeline.
|
| 591 |
|
| 592 | Features:
|
| 593 |
|
| 594 | @itemize
|
| 595 | @item Cross platform support.
|
| 596 | @item Easily create a window for ModernGL using pyglet, pygame, PySide2, GLFW,
|
| 597 | SDL2, PyQt5 or tkinter supporting a wide range of window, keyboard and mouse
|
| 598 | events. These events are unified into a single system so your project can
|
| 599 | work with any window.
|
| 600 | @item Load 2D textures, texture arrays and cube maps using Pillow.
|
| 601 | @item Load shaders as single or multiple @code{glsl} files.
|
| 602 | @item Load objects/scenes from wavefront/obj, GLTF 2.0 or STL.
|
| 603 | @item Resource finder system supporting multiple resource directories.
|
| 604 | @item A highly plugable library supporting custom loaders, resource finders
|
| 605 | and windows.
|
| 606 | @item Type hints everywhere making code completion and linting a breeze.
|
| 607 | @end itemize")
|
| 608 | (license license:expat)))
|
| 609 |
|
| 610 | (define-public python-picosvg
|
| 611 | (package
|
| 612 | (name "python-picosvg")
|
| 613 | (version "0.23.0")
|
| 614 | (source
|
| 615 | (origin
|
| 616 | (method git-fetch)
|
| 617 | (uri (git-reference
|
| 618 | (url "https://github.com/googlefonts/picosvg")
|
| 619 | (commit (string-append "v" version))))
|
| 620 | (file-name (git-file-name name version))
|
| 621 | (sha256
|
| 622 | (base32 "0glc6d9d81jnwqnizhdifvhhxhk5ly7qbss1alsyqxh3h64hs9g0"))))
|
| 623 | (build-system pyproject-build-system)
|
| 624 | (native-inputs
|
| 625 | (list python-pytest python-setuptools python-setuptools-scm))
|
| 626 | (propagated-inputs
|
| 627 | (list python-absl-py python-lxml python-skia-pathops))
|
| 628 | (home-page "https://github.com/googlefonts/picosvg")
|
| 629 | (synopsis "Tool to simplify SVGs")
|
| 630 | (description
|
| 631 | "@code{picosvg} converts an input SVG into a @code{pico} SVG.
|
| 632 |
|
| 633 | A @code{pico} SVG has the following characteristics:
|
| 634 | @itemize
|
| 635 | @item Exactly 1 <defs> element, first child of root
|
| 636 | @item Only gradients defined under <defs>
|
| 637 | @item After the initial <defs>, only <g> and <path> <g> is eliminated when
|
| 638 | possible, but may be retained for opacity
|
| 639 | @item Only absolute coordinates
|
| 640 | @item Only commands that specify full coordinates, no shorthand (H, S, etc)
|
| 641 | @end itemize")
|
| 642 | (license license:asl2.0)))
|
| 643 |
|
| 644 | (define-public python-pivy
|
| 645 | (package
|
| 646 | (name "python-pivy")
|
| 647 | (version "0.6.11")
|
| 648 | (source
|
| 649 | (origin
|
| 650 | (method git-fetch)
|
| 651 | (uri (git-reference
|
| 652 | (url "https://github.com/coin3d/pivy")
|
| 653 | (commit version)))
|
| 654 | (file-name (git-file-name name version))
|
| 655 | (sha256
|
| 656 | (base32 "0rjbhhxyrh0fszc0va7qmkv6ayf2s49ppnw31p51xmq63bx3n5wc"))))
|
| 657 | (build-system pyproject-build-system)
|
| 658 | (arguments
|
| 659 | (list
|
| 660 | |
| 661 | #:tests? #f
|
| 662 | #:phases
|
| 663 | #~(modify-phases %standard-phases
|
| 664 | (add-after 'unpack 'patch-cmake-include-dirs
|
| 665 | (lambda _
|
| 666 | |
| 667 | (substitute* "CMakeLists.txt"
|
| 668 | (("\\$\\{SoQt_INCLUDE_DIRS}")
|
| 669 | "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}")))))))
|
| 670 | (native-inputs
|
| 671 | (list cmake-minimal
|
| 672 | python-setuptools
|
| 673 | swig-4.4))
|
| 674 | (inputs
|
| 675 | (list qtbase
|
| 676 | libxi
|
| 677 | libice
|
| 678 | glew
|
| 679 | coin3d))
|
| 680 | (home-page "https://github.com/coin3d/pivy")
|
| 681 | (synopsis "Python bindings to Coin3D")
|
| 682 | (description
|
| 683 | "Pivy provides python bindings for Coin, a 3D graphics library with an
|
| 684 | Application Programming Interface based on the Open Inventor 2.1 API.")
|
| 685 | (license license:isc)))
|
| 686 |
|
| 687 | (define-public python-py3exiv2
|
| 688 | (package
|
| 689 | (name "python-py3exiv2")
|
| 690 | (version "0.12.0")
|
| 691 | (source
|
| 692 | (origin
|
| 693 | (method url-fetch)
|
| 694 | |
| 695 | (uri (pypi-uri "py3exiv2" version))
|
| 696 | (sha256
|
| 697 | (base32 "12is7xb393wvq3la9lhi0y1xkmpvjj6v13cikb7k6iqcfrgkxckj"))))
|
| 698 | (build-system pyproject-build-system)
|
| 699 | (arguments
|
| 700 | (list #:tests? #f)) |
| 701 | (native-inputs
|
| 702 | (list boost
|
| 703 | python-setuptools))
|
| 704 | (inputs
|
| 705 | (list exiv2))
|
| 706 | (home-page "https://www.py3exiv2.tuxfamily.org/")
|
| 707 | (synopsis "Python binding to the exiv2 library")
|
| 708 | (description
|
| 709 | "This package provides a Python binding to the library
|
| 710 | @code{https://exiv2.org/, exiv2} - cross-platform C++ library and a command
|
| 711 | line utility to manage image metadata.")
|
| 712 | (license license:gpl3+)))
|
| 713 |
|
| 714 | (define-public python-pyglet
|
| 715 | (package
|
| 716 | (name "python-pyglet")
|
| 717 | (version "2.0.18")
|
| 718 | (source
|
| 719 | (origin
|
| 720 | (method url-fetch)
|
| 721 | (uri (pypi-uri "pyglet" version))
|
| 722 | (sha256
|
| 723 | (base32 "1p4rizj81vfqxal288m3afbrgk0il3w7k5kmhai2sah8f26j7ybw"))))
|
| 724 | (build-system pyproject-build-system)
|
| 725 | (arguments
|
| 726 | (list
|
| 727 | #:test-flags
|
| 728 | #~(list "tests"
|
| 729 | "--ignore=tests/interactive"
|
| 730 | |
| 731 | "--ignore=tests/integration/media/test_openal.py"
|
| 732 | "--ignore=tests/integration/text/test_empty_document.py"
|
| 733 | |
| 734 | "-k" (string-append "not test2"
|
| 735 | " and not test5"
|
| 736 | " and not testPad"
|
| 737 | " and not testPad"
|
| 738 | " and not testRange"
|
| 739 | " and not testRect"
|
| 740 | " and not testRect"
|
| 741 | " and not testSet"
|
| 742 | " and not testSquare"
|
| 743 | " and not testSquare"
|
| 744 | " and not testTuple"
|
| 745 | " and not testTupleRange"
|
| 746 | " and not test_context_noshare_texture"
|
| 747 | " and not test_context_share_texture"
|
| 748 | " and not test_method"
|
| 749 | " and not test_openal_listener"
|
| 750 | " and not test_parse_all_controller_mappings"
|
| 751 | " and not test_player_play"
|
| 752 | " and not test_player_play_multiple"
|
| 753 | " and not test_stream_write_needed"
|
| 754 | " and not test_window_caption"
|
| 755 | " and not test_window_caption_from_argv"))
|
| 756 | #:phases
|
| 757 | #~(modify-phases %standard-phases
|
| 758 | (add-after 'unpack 'patch-lib-paths
|
| 759 | (lambda* (#:key inputs #:allow-other-keys)
|
| 760 | (substitute* (list "pyglet/font/fontconfig.py"
|
| 761 | "pyglet/font/freetype_lib.py"
|
| 762 | "pyglet/gl/lib_glx.py"
|
| 763 | "pyglet/input/linux/evdev.py"
|
| 764 | "pyglet/libs/egl/egl.py"
|
| 765 | "pyglet/libs/egl/lib.py"
|
| 766 | "pyglet/libs/x11/xf86vmode.py"
|
| 767 | "pyglet/libs/x11/xinerama.py"
|
| 768 | "pyglet/libs/x11/xlib.py"
|
| 769 | "pyglet/libs/x11/xsync.py"
|
| 770 | "pyglet/media/drivers/openal/lib_openal.py"
|
| 771 | "pyglet/media/drivers/pulse/lib_pulseaudio.py")
|
| 772 | (("'EGL'")
|
| 773 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 774 | "lib/libEGL.so"))
|
| 775 | (("\"fontconfig\"")
|
| 776 | (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal")
|
| 777 | "lib/libfontconfig.so"))
|
| 778 | (("\"freetype\"")
|
| 779 | (format #f "'~a/~a'" #$(this-package-input "freetype")
|
| 780 | "lib/libfreetype.so"))
|
| 781 | (("'GL'")
|
| 782 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 783 | "lib/libGL.so"))
|
| 784 | (("'GLU'")
|
| 785 | (format #f "'~a/~a'" #$(this-package-input "glu")
|
| 786 | "lib/libGLU.so"))
|
| 787 | (("'X11'")
|
| 788 | (format #f "'~a/~a'" #$(this-package-input "libx11")
|
| 789 | "lib/libX11.so"))
|
| 790 | (("'Xext'")
|
| 791 | (format #f "'~a/~a'" #$(this-package-input "libxext")
|
| 792 | "lib/libXext.so"))
|
| 793 | (("'Xinerama'")
|
| 794 | (format #f "'~a/~a'" #$(this-package-input "libxinerama")
|
| 795 | "lib/libXinerama.so"))
|
| 796 | (("'Xxf86vm'")
|
| 797 | (format #f "'~a/~a'" #$(this-package-input "libxxf86vm")
|
| 798 | "lib/libXxf86vm.so"))
|
| 799 | (("'c'")
|
| 800 | (format #f "'~a/~a'" #$(this-package-input "glibc")
|
| 801 | "lib/libc.so"))
|
| 802 | (("'gdk-x11-2.0'")
|
| 803 | (format #f "'~a/~a'" #$(this-package-input "gtk+")
|
| 804 | "lib/gdk-pixbuf-2.0.so"))
|
| 805 | (("'gdk_pixbuf-2.0'")
|
| 806 | (format #f "'~a/~a'" #$(this-package-input "gdk-pixbuf")
|
| 807 | "lib/libgdk_pixbuf-2.0.so"))
|
| 808 | (("'openal'")
|
| 809 | (format #f "'~a/~a'" #$(this-package-input "openal")
|
| 810 | "lib/libopenal.so"))
|
| 811 | (("'pulse'")
|
| 812 | (format #f "'~a/~a'" #$(this-package-input "pulseaudio")
|
| 813 | "lib/libpulse.so")))))
|
| 814 | (add-before 'check 'prepare-test-environment
|
| 815 | (lambda _
|
| 816 | |
| 817 | (system "Xvfb :1 &")
|
| 818 | (setenv "DISPLAY" ":1")
|
| 819 | (setenv "HOME" "/tmp")
|
| 820 | (setenv "PYGLET_HEADLESS" "True"))))))
|
| 821 | (native-inputs
|
| 822 | (list python-flit-core
|
| 823 | python-pytest
|
| 824 | unzip
|
| 825 | xorg-server-for-tests))
|
| 826 | (inputs
|
| 827 | (list ffmpeg
|
| 828 | fontconfig
|
| 829 | freeglut
|
| 830 | freetype
|
| 831 | gdk-pixbuf
|
| 832 | glibc
|
| 833 | glu
|
| 834 | gtk+
|
| 835 | libx11
|
| 836 | libxext
|
| 837 | libxinerama
|
| 838 | libxxf86vm
|
| 839 | mesa
|
| 840 | openal
|
| 841 | pulseaudio
|
| 842 | python-pygobject))
|
| 843 | (home-page "https://github.com/pyglet/pyglet")
|
| 844 | (synopsis "Windowing and multimedia library")
|
| 845 | (description
|
| 846 | "Pyglet is a Python library for developing games and other visually-rich
|
| 847 | applications. It supports windowing, user interface event handling,
|
| 848 | Joysticks, OpenGL graphics, loading images and videos, playing sounds and
|
| 849 | music." )
|
| 850 | (license license:bsd-3)))
|
| 851 |
|
| 852 | (define-public python-pyglet-1
|
| 853 | (package
|
| 854 | (inherit python-pyglet)
|
| 855 | (name "python-pyglet")
|
| 856 | (version "1.5.30") |
| 857 | (source
|
| 858 | (origin
|
| 859 | (method git-fetch)
|
| 860 | (uri (git-reference
|
| 861 | (url "https://github.com/pyglet/pyglet")
|
| 862 | (commit (string-append "v" version))))
|
| 863 | (file-name (git-file-name name version))
|
| 864 | (sha256
|
| 865 | (base32 "0q1690pqkks3na6vc8ps44h0gymlmq752xlk7fm0yvz05yqdqn51"))))
|
| 866 | (arguments
|
| 867 | (list
|
| 868 | |
| 869 | #:test-flags
|
| 870 | #~(list "--ignore=tests/base"
|
| 871 | "--ignore=tests/interactive"
|
| 872 | "--ignore=tests/integration/media"
|
| 873 | "--ignore=tests/integration/font"
|
| 874 | "--ignore=tests/integration/platform/test_linux_fontconfig.py"
|
| 875 | |
| 876 | |
| 877 | "--ignore=tests/integration/window/test_event_sequence.py"
|
| 878 | |
| 879 | |
| 880 | "--deselect=tests/unit/media/test_listener.py::test_openal_listener")
|
| 881 | #:phases
|
| 882 | #~(modify-phases %standard-phases
|
| 883 | (add-after 'unpack 'fix-python-3.12-incompatibility
|
| 884 | |
| 885 | |
| 886 | (lambda _
|
| 887 | (substitute* "tests/integration/test_toplevel_imports.py"
|
| 888 | (("import imp") ""))))
|
| 889 | (add-after 'unpack 'patch-lib-paths
|
| 890 | (lambda* (#:key inputs #:allow-other-keys)
|
| 891 | (substitute* (list "pyglet/font/fontconfig.py"
|
| 892 | "pyglet/font/freetype_lib.py"
|
| 893 | "pyglet/gl/lib_glx.py"
|
| 894 | "pyglet/libs/egl/egl.py"
|
| 895 | "pyglet/libs/egl/lib.py"
|
| 896 | "pyglet/libs/x11/xf86vmode.py"
|
| 897 | "pyglet/libs/x11/xinerama.py"
|
| 898 | "pyglet/libs/x11/xlib.py"
|
| 899 | "pyglet/libs/x11/xsync.py"
|
| 900 | "pyglet/media/drivers/openal/lib_openal.py"
|
| 901 | "pyglet/media/drivers/pulse/lib_pulseaudio.py")
|
| 902 | (("'EGL'")
|
| 903 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 904 | "lib/libEGL.so"))
|
| 905 | (("'fontconfig'")
|
| 906 | (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal")
|
| 907 | "lib/libfontconfig.so"))
|
| 908 | (("'freetype'")
|
| 909 | (format #f "'~a/~a'" #$(this-package-input "freetype")
|
| 910 | "lib/libfreetype.so"))
|
| 911 | (("'GL'")
|
| 912 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 913 | "lib/libGL.so"))
|
| 914 | (("'GLU'")
|
| 915 | (format #f "'~a/~a'" #$(this-package-input "glu")
|
| 916 | "lib/libGLU.so"))
|
| 917 | (("'X11'")
|
| 918 | (format #f "'~a/~a'" #$(this-package-input "libx11")
|
| 919 | "lib/libX11.so"))
|
| 920 | (("'Xext'")
|
| 921 | (format #f "'~a/~a'" #$(this-package-input "libxext")
|
| 922 | "lib/libXext.so"))
|
| 923 | (("'Xinerama'")
|
| 924 | (format #f "'~a/~a'" #$(this-package-input "libxinerama")
|
| 925 | "lib/libXinerama.so"))
|
| 926 | (("'Xxf86vm'")
|
| 927 | (format #f "'~a/~a'" #$(this-package-input "libxxf86vm")
|
| 928 | "lib/libXxf86vm.so"))
|
| 929 | (("'c'")
|
| 930 | (format #f "'~a/~a'" #$(this-package-input "glibc")
|
| 931 | "lib/libc.so"))
|
| 932 | (("'gdk-x11-2.0'")
|
| 933 | (format #f "'~a/~a'" #$(this-package-input "gtk+")
|
| 934 | "lib/gdk-pixbuf-2.0.so"))
|
| 935 | (("'gdk_pixbuf-2.0'")
|
| 936 | (format #f "'~a/~a'" #$(this-package-input "gdk-pixbuf")
|
| 937 | "lib/libgdk_pixbuf-2.0.so"))
|
| 938 | (("'openal'")
|
| 939 | (format #f "'~a/~a'" #$(this-package-input "openal")
|
| 940 | "lib/libopenal.so"))
|
| 941 | (("'pulse'")
|
| 942 | (format #f "'~a/~a'" #$(this-package-input "pulseaudio")
|
| 943 | "lib/libpulse.so")))))
|
| 944 | (add-before 'check 'prepare-test-environment
|
| 945 | (lambda _
|
| 946 | |
| 947 | (system "Xvfb :1 &")
|
| 948 | (setenv "DISPLAY" ":1")
|
| 949 | (setenv "HOME" "/tmp")
|
| 950 | (setenv "PYGLET_HEADLESS" "True"))))))
|
| 951 | (native-inputs
|
| 952 | (list python-pytest
|
| 953 | python-setuptools
|
| 954 | xorg-server-for-tests))))
|
| 955 |
|
| 956 | (define-public python-pyopengl
|
| 957 | (package
|
| 958 | (name "python-pyopengl")
|
| 959 | (version "3.1.10")
|
| 960 | (source
|
| 961 | (origin
|
| 962 | (method git-fetch)
|
| 963 | (uri (git-reference
|
| 964 | (url "https://github.com/mcfletch/pyopengl")
|
| 965 | (commit version)))
|
| 966 | (file-name (git-file-name name version))
|
| 967 | (sha256
|
| 968 | (base32 "0gn6n6z76xrvwj9inl2v6rr707n1w8s072qxfmzpla1i9bfckzjk"))))
|
| 969 | (build-system pyproject-build-system)
|
| 970 | (arguments
|
| 971 | (list
|
| 972 | |
| 973 | #:test-flags
|
| 974 | #~(list #$@(map (lambda (test) (string-append "--deselect=tests/" test))
|
| 975 | (list
|
| 976 | |
| 977 | "test_checks.py::test_check_crash_on_glutinit"
|
| 978 | "test_checks.py::test_check_egl_es1"
|
| 979 | "test_checks.py::test_check_egl_es2"
|
| 980 | "test_checks.py::test_check_egl_opengl"
|
| 981 | "test_checks.py::test_check_glutwindow"
|
| 982 | "test_checks.py::test_check_freeglut_deinit"
|
| 983 | "test_checks.py::test_check_glut_debug"
|
| 984 | "test_checks.py::test_check_glut_fc"
|
| 985 | "test_checks.py::test_check_glut_load"
|
| 986 | "test_checks.py::test_check_glutinit"
|
| 987 | "test_checks.py::test_check_glutinit_0args"
|
| 988 | "test_checks.py::test_check_glutinit_single"
|
| 989 | "test_checks.py::test_check_glutinit_simplest"
|
| 990 | "test_checks.py::test_egl_ext_enumerate"
|
| 991 | "test_checks.py::test_test_instanced_draw_detect"
|
| 992 | "test_checks.py::test_test_gldouble_ctypes"
|
| 993 | |
| 994 | |
| 995 | "test_arraydatatype.py::TestCoreDatatype::test_numpyConversion"
|
| 996 | "test_arraydatatype.py::TestCoreDatatype::test_pointers"
|
| 997 | "test_core.py::TestCore::test_glCallLists_twice2"
|
| 998 | "test_core.py::TestCore::test_glmultidraw"
|
| 999 | |
| 1000 | "test_checks.py::test_feedbackvarying"
|
| 1001 | "test_checks.py::test_test_sf2946226"
|
| 1002 | "test_checks.py::test_test_glgetactiveuniform"
|
| 1003 | |
| 1004 | |
| 1005 | "test_core.py::TestCore::test_get_read_fb_binding"
|
| 1006 | "test_core.py::TestCore::test_lookupint"
|
| 1007 | |
| 1008 | "test_core.py::TestCore::test_get_version")))
|
| 1009 | #:phases
|
| 1010 | #~(modify-phases %standard-phases
|
| 1011 | (add-before 'build 'fix-paths
|
| 1012 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1013 | (substitute* '("OpenGL/platform/ctypesloader.py")
|
| 1014 | (("filenames_to_try = \\[base_name\\]")
|
| 1015 | "filenames_to_try = [name]"))
|
| 1016 | (substitute* '("OpenGL/platform/glx.py"
|
| 1017 | "OpenGL/platform/egl.py"
|
| 1018 | "OpenGL/platform/osmesa.py"
|
| 1019 | "OpenGL/platform/darwin.py"
|
| 1020 | "tests/check_glut_load.py")
|
| 1021 | (("\"GLU\",")
|
| 1022 | (format #f "~s," (search-input-file inputs "lib/libGLU.so")))
|
| 1023 | (("'GLU',")
|
| 1024 | (format #f "~s," (search-input-file inputs "lib/libGLU.so")))
|
| 1025 | (("\"glut\",")
|
| 1026 | (format #f "~s," (search-input-file inputs "lib/libglut.so")))
|
| 1027 | (("'glut',")
|
| 1028 | (format #f "~s," (search-input-file inputs "lib/libglut.so")))
|
| 1029 | (("'(GL|EGL|GLESv1_CM|GLESv2)'" all gl-library)
|
| 1030 | (format #f "~s" (search-input-file inputs (string-append
|
| 1031 | "lib/lib"
|
| 1032 | gl-library ".so"))))
|
| 1033 | (("\"(GLESv1_CM|GLESv2)\"" all gl-library)
|
| 1034 | (format #f "~s" (search-input-file inputs (string-append
|
| 1035 | "lib/lib"
|
| 1036 | gl-library ".so")))))))
|
| 1037 | (add-before 'check 'pre-check
|
| 1038 | (lambda _
|
| 1039 | (setenv "LANG" "fr_FR.UTF-8")
|
| 1040 | (setenv "LANGUAGE" "fr_FR.UTF-8")
|
| 1041 | (setenv "DISPLAY" ":1")
|
| 1042 | (setenv "HOME" "/tmp")
|
| 1043 | (setenv "USER" "guix")
|
| 1044 | (setenv "XDG_RUNTIME_DIR" "/tmp")
|
| 1045 | (setenv "XDG_SESSION_ID" "11235813")
|
| 1046 | (setenv "XDG_SESSION_PATH" "/tmp")
|
| 1047 | (setenv "XDG_SESSION_TYPE" "x11"))))))
|
| 1048 | (native-inputs
|
| 1049 | (list python-cython
|
| 1050 | python-numpy
|
| 1051 | python-psutil
|
| 1052 | python-pygame-ce
|
| 1053 | python-pytest
|
| 1054 | python-setuptools))
|
| 1055 | (inputs
|
| 1056 | (list freeglut
|
| 1057 | glu
|
| 1058 | mesa))
|
| 1059 | (home-page "https://pyopengl.sourceforge.net")
|
| 1060 | (synopsis "Standard OpenGL bindings for Python")
|
| 1061 | (description
|
| 1062 | "PyOpenGL is the most common cross platform Python binding to OpenGL and
|
| 1063 | related APIs. The binding is created using the standard @code{ctypes}
|
| 1064 | library.")
|
| 1065 | (license license:bsd-3)))
|
| 1066 |
|
| 1067 | (define-public python-pyopengl-accelerate
|
| 1068 | (package
|
| 1069 | (inherit python-pyopengl)
|
| 1070 | (name "python-pyopengl-accelerate")
|
| 1071 | (version "3.1.10")
|
| 1072 | (source
|
| 1073 | (origin
|
| 1074 | (method url-fetch)
|
| 1075 | (uri (pypi-uri "pyopengl_accelerate" version))
|
| 1076 | (sha256
|
| 1077 | (base32
|
| 1078 | "0waskwvw9mp830bnnxcqd8bkh7a4qbnr0fcjnnw35xx6y21iqxc2"))))
|
| 1079 | (arguments
|
| 1080 | `(#:tests? #f
|
| 1081 | #:phases
|
| 1082 | (modify-phases %standard-phases
|
| 1083 | (delete 'fix-paths))))
|
| 1084 | (synopsis "Acceleration code for PyOpenGL")
|
| 1085 | (description
|
| 1086 | "This is the Cython-coded accelerator module for PyOpenGL.")))
|
| 1087 |
|
| 1088 | (define-public python-pysdl2
|
| 1089 | (package
|
| 1090 | (name "python-pysdl2")
|
| 1091 | (version "0.9.17")
|
| 1092 | (source
|
| 1093 | (origin
|
| 1094 | (method url-fetch)
|
| 1095 | (uri (pypi-uri "pysdl2" version))
|
| 1096 | (sha256
|
| 1097 | (base32 "0axm6m3wj8x643zg65g60xdpaxanaqdilvp4yysks4pblh0yzij8"))))
|
| 1098 | (build-system pyproject-build-system)
|
| 1099 | (arguments
|
| 1100 | (list
|
| 1101 | #:tests? #f |
| 1102 | #:phases
|
| 1103 | #~(modify-phases %standard-phases
|
| 1104 | (add-after 'unpack 'patch-paths
|
| 1105 | (lambda _
|
| 1106 | (substitute* "sdl2/dll.py"
|
| 1107 | |
| 1108 | |
| 1109 | (("prepath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
|
| 1110 | "prepath = \"system\"")
|
| 1111 | (("^import sdl2dll$") "")
|
| 1112 | (("postpath = os\\.getenv\\('PYSDL2_DLL_PATH'\\)")
|
| 1113 | "postpath = \"system\"")
|
| 1114 | (("DLL\\(.*, os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)\\)")
|
| 1115 | (format #f "DLL('SDL2', ['SDL2', 'SDL2-2.0', 'SDL2-2.0.0'], '~a/lib')"
|
| 1116 | #$(this-package-input "sdl2"))))
|
| 1117 | (substitute* "sdl2/sdlimage.py"
|
| 1118 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 1119 | (format #f "'~a/~a'" #$(this-package-input "sdl2-image")
|
| 1120 | "lib/libSDL2_image.so")))
|
| 1121 | (substitute* "sdl2/sdlgfx.py"
|
| 1122 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 1123 | (format #f "'~a/~a'" #$(this-package-input "sdl2-gfx")
|
| 1124 | "lib/libSDL2_gfx.so")))
|
| 1125 | (substitute* "sdl2/sdlmixer.py"
|
| 1126 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 1127 | (format #f "'~a/~a'" #$(this-package-input "sdl2-mixer")
|
| 1128 | "lib/libSDL2_mixer.so")))
|
| 1129 | (substitute* "sdl2/sdlttf.py"
|
| 1130 | (("os\\.getenv\\(\"PYSDL2_DLL_PATH\"\\)")
|
| 1131 | (format #f "'~a/~a'" #$(this-package-input "sdl2-ttf")
|
| 1132 | "lib/libSDL2_ttf.so"))))))))
|
| 1133 | (native-inputs
|
| 1134 | (list python-setuptools
|
| 1135 | python-wheel))
|
| 1136 | (inputs
|
| 1137 | (list sdl2 sdl2-image sdl2-gfx sdl2-mixer sdl2-ttf))
|
| 1138 | (home-page "https://github.com/py-sdl/py-sdl2")
|
| 1139 | (synopsis "Python bindings around the SDL2 game development library")
|
| 1140 | (description
|
| 1141 | "PySDL2 is a pure Python wrapper around the
|
| 1142 | @code{SDL2},@code{SDL2_mixer}, @code{SDL2_image}, @code{SDL2_ttf}, and
|
| 1143 | @code{SDL2_gfx} libraries. Instead of relying on C code, it uses the built-in
|
| 1144 | ctypes module to interface with SDL2, and provides simple Python classes and
|
| 1145 | wrappers for common SDL2 functionality.")
|
| 1146 | (license license:cc0)))
|
| 1147 |
|
| 1148 | (define-public python-pywavefront
|
| 1149 | (package
|
| 1150 | (name "python-pywavefront")
|
| 1151 | (version "1.3.3")
|
| 1152 | (source
|
| 1153 | (origin
|
| 1154 | (method git-fetch)
|
| 1155 | (uri (git-reference
|
| 1156 | (url "https://github.com/pywavefront/PyWavefront")
|
| 1157 | (commit version)))
|
| 1158 | (file-name (git-file-name name version))
|
| 1159 | (sha256
|
| 1160 | (base32 "07r9z0dzz5xq9qlmp855mxsf9776b1ypk06nc9cf69r9d8pk8bkj"))))
|
| 1161 | (build-system pyproject-build-system)
|
| 1162 | (native-inputs
|
| 1163 | (list python-mock
|
| 1164 | python-pytest
|
| 1165 | python-setuptools))
|
| 1166 | (home-page "https://github.com/pywavefront/PyWavefront")
|
| 1167 | (synopsis "Python library for loading Wavefront @code{.obj} files")
|
| 1168 | (description
|
| 1169 | "PyWavefront reads Wavefront 3D object files (@code{something.obj},
|
| 1170 | @code{something.obj.gz} and @code{something.mtl}) and generates interleaved
|
| 1171 | vertex data for each material ready for rendering.
|
| 1172 |
|
| 1173 | A simple (optional) visualization module is also provided for rendering the
|
| 1174 | object(s). The interleaved data can also be used by more modern renderers
|
| 1175 | thought VBOs or VAOs.
|
| 1176 |
|
| 1177 | Currently the most commonly used features in the specification has been
|
| 1178 | implemented:
|
| 1179 | @itemize
|
| 1180 | @item positions;
|
| 1181 | @item texture coordinates;
|
| 1182 | @item normals;
|
| 1183 | @item vertex color;
|
| 1184 | @item material parsing;
|
| 1185 | @item texture and texture parameters.
|
| 1186 | @end itemize")
|
| 1187 | (license license:bsd-3)))
|
| 1188 |
|
| 1189 | (define-public python-qtawesome
|
| 1190 | (package
|
| 1191 | (name "python-qtawesome")
|
| 1192 | (version "1.4.2")
|
| 1193 | (source
|
| 1194 | (origin
|
| 1195 | (method git-fetch)
|
| 1196 | (uri (git-reference
|
| 1197 | (url "https://github.com/spyder-ide/qtawesome")
|
| 1198 | (commit (string-append "v" version))))
|
| 1199 | (file-name (git-file-name name version))
|
| 1200 | (sha256
|
| 1201 | (base32 "16vjnngg5hjmmbp0c2ikgc88g8q0l44n1w3wa04ga5zfhd1yhyn2"))))
|
| 1202 | (build-system pyproject-build-system)
|
| 1203 | (arguments
|
| 1204 | (list
|
| 1205 | #:test-flags
|
| 1206 | |
| 1207 | #~(list "--ignore" "qtawesome/tests/test_qtawesome.py")
|
| 1208 | #:phases
|
| 1209 | #~(modify-phases %standard-phases
|
| 1210 | (add-before 'check 'setenv
|
| 1211 | (lambda _
|
| 1212 | (setenv "QT_QPA_PLATFORM" "offscreen"))))))
|
| 1213 | (propagated-inputs (list python-qtpy python-pyqt-6))
|
| 1214 | (native-inputs (list python-pytest python-pytest-qt python-setuptools))
|
| 1215 | (home-page "https://github.com/spyder-ide/qtawesome")
|
| 1216 | (synopsis "FontAwesome icons in PyQt and PySide applications")
|
| 1217 | (description
|
| 1218 | "@code{FontAwesome} icons in @code{PyQt} and @code{PySide} applications.")
|
| 1219 | (license license:expat)))
|
| 1220 |
|
| 1221 | (define-public python-vispy
|
| 1222 | (package
|
| 1223 | (name "python-vispy")
|
| 1224 | (version "0.14.3")
|
| 1225 | (source
|
| 1226 | (origin
|
| 1227 | (method url-fetch)
|
| 1228 | (uri (pypi-uri "vispy" version))
|
| 1229 | (sha256
|
| 1230 | (base32 "07fkk4bdffn0iq5cprk7ydj978rqc4lvzfcs2vkzgfh8m53vifzg"))))
|
| 1231 | (build-system pyproject-build-system)
|
| 1232 | (arguments
|
| 1233 | (list
|
| 1234 | #:test-flags
|
| 1235 | |
| 1236 | |
| 1237 | #~(list "-k" (string-append "not test_read_write_image"
|
| 1238 | " and not test_wavefront"
|
| 1239 | " and not test_config"))
|
| 1240 | #:phases
|
| 1241 | #~(modify-phases %standard-phases
|
| 1242 | (add-after 'unpack 'patch-library-path
|
| 1243 | (lambda _
|
| 1244 | (substitute* (list "vispy/ext/egl.py"
|
| 1245 | "vispy/ext/fontconfig.py"
|
| 1246 | "vispy/gloo/gl/es2.py"
|
| 1247 | "vispy/gloo/gl/gl2.py")
|
| 1248 | (("ctypes\\.util\\.find_library\\('EGL'\\)")
|
| 1249 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 1250 | "lib/libEGL.so"))
|
| 1251 | (("ctypes\\.util\\.find_library\\('GL'\\)")
|
| 1252 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 1253 | "lib/libGL.so"))
|
| 1254 | (("ctypes\\.util\\.find_library\\('GLESv2'\\)")
|
| 1255 | (format #f "'~a/~a'" #$(this-package-input "mesa")
|
| 1256 | "lib/libGLESv2.so"))
|
| 1257 | (("util\\.find_library\\('fontconfig'\\)")
|
| 1258 | (format #f "'~a/~a'" #$(this-package-input "fontconfig-minimal")
|
| 1259 | "lib/libfontconfig.so")))))
|
| 1260 | (add-before 'check 'prepare-test-environment
|
| 1261 | (lambda _
|
| 1262 | |
| 1263 | |
| 1264 | |
| 1265 | (setenv "HOME" "/tmp")
|
| 1266 | (invoke "python" "setup.py" "build_ext" "--inplace"))))))
|
| 1267 | (native-inputs
|
| 1268 | (list python-cython
|
| 1269 | python-pytest
|
| 1270 | python-setuptools
|
| 1271 | python-setuptools-scm
|
| 1272 | python-wheel))
|
| 1273 | (inputs
|
| 1274 | (list fontconfig
|
| 1275 | mesa))
|
| 1276 | (propagated-inputs
|
| 1277 | (list python-freetype-py
|
| 1278 | python-hsluv
|
| 1279 | python-kiwisolver
|
| 1280 | python-meshio
|
| 1281 | python-numpy
|
| 1282 | python-packaging
|
| 1283 | python-pillow))
|
| 1284 | (home-page "http://vispy.org")
|
| 1285 | (synopsis "Interactive scientific visualization in Python")
|
| 1286 | (description
|
| 1287 | "VisPy is a high-performance interactive 2D/3D data visualization library
|
| 1288 | leveraging the computational power of modern Graphics Processing Units (GPUs)
|
| 1289 | through the OpenGL library to display very large datasets.")
|
| 1290 | (license license:bsd-3)))
|
| 1291 |
|
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | |