wigust-urho3d.scm 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. (define-module (gnu packages wigust-urho3d)
  2. #:use-module (ice-9 match)
  3. #:use-module ((guix licenses) #:prefix license:)
  4. #:use-module (guix utils)
  5. #:use-module (guix packages)
  6. #:use-module (guix download)
  7. #:use-module (guix git-download)
  8. #:use-module (guix gexp)
  9. #:use-module (guix build-system cmake)
  10. #:use-module (gnu packages)
  11. #:use-module (gnu packages linux)
  12. #:use-module (gnu packages gl)
  13. #:use-module (gnu packages pulseaudio)
  14. #:use-module (gnu packages sdl)
  15. #:use-module (gnu packages xorg))
  16. (define-public urho3d
  17. (package
  18. (name "urho3d")
  19. (version "1.7")
  20. (source (origin
  21. (method url-fetch)
  22. (uri (string-append "https://github.com/urho3d/Urho3D"
  23. "/archive/" version ".tar.gz"))
  24. (sha256
  25. (base32
  26. "1im63n9rx8qq1ks6aq6jrl5ikxg87hqhsy06miqc317hpm1iyav5"))))
  27. (build-system cmake-build-system)
  28. (inputs `(("libx11" ,libx11)
  29. ("libxcursor" ,libxcursor)
  30. ("libxext" ,libxext)
  31. ("libxi" ,libxi)
  32. ("libxinerama" ,libxinerama)
  33. ("libxrandr" ,libxrandr)
  34. ("libxrender" ,libxrender)
  35. ("libxscrnsaver" ,libxscrnsaver)
  36. ("mesa" ,mesa)
  37. ("alsa-lib" ,alsa-lib)
  38. ("pulseaudio" ,pulseaudio)))
  39. (arguments
  40. '(#:tests?
  41. #f ; There are no tests
  42. #:phases
  43. (modify-phases %standard-phases
  44. (add-after 'configure 'use-full-library-paths
  45. (lambda* (#:key inputs #:allow-other-keys)
  46. (substitute* "../build/Source/ThirdParty/SDL/include/generated/SDL_config.h"
  47. (("#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \"libasound\\.so\\.2\"")
  48. (string-append "#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC \""
  49. (assoc-ref inputs "alsa-lib")
  50. "/lib/libasound.so.2"
  51. "\""))
  52. (("#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \"libpulse-simple\\.so\\.0\"")
  53. (string-append "#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC \""
  54. (assoc-ref inputs "pulseaudio")
  55. "/lib/libpulse-simple.so.0"
  56. "\"")))
  57. #t)))))
  58. (home-page "https://urho3d.github.io/")
  59. (synopsis "Cross-platform 2D and 3D game engine")
  60. (description "Cross-platform 2D and 3D game engine")
  61. (license license:expat)))
  62. (define-public urho3d-checkout
  63. (let ((commit "4af4148048a6443154c6f0498d32626d10f1e86b")
  64. (revision "1"))
  65. (package
  66. (inherit urho3d)
  67. (name "urho3d-checkout")
  68. (version (string-append (package-version urho3d) "-" revision "."
  69. (string-take commit 7)))
  70. (source (origin
  71. (method git-fetch)
  72. (uri (git-reference
  73. (url "https://github.com/urho3d/Urho3D")
  74. (commit commit)))
  75. (file-name (string-append name "-" version "-checkout"))
  76. (sha256
  77. (base32
  78. "1nchxswrkfgzsxghi6c55b27zy9127ni7yvnb4xw2xdddyfm1wl0")))))))