Advertisement
Guest User

myraylib

a guest
Jan 1st, 2024
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 2.11 KB | None | 0 0
  1. (define-module (gnu packages myraylib)
  2.   #:use-module ((srfi srfi-1) #:hide (zip))
  3.   #:use-module (ice-9 match)
  4.   #:use-module (guix licenses)
  5.   #:use-module (guix packages)
  6.   #:use-module (guix gexp)
  7.   #:use-module (guix download)
  8.   #:use-module (guix git-download)
  9.   #:use-module (guix utils)
  10.   #:use-module (guix build-system gnu)
  11.     #:use-module (gnu packages gl)
  12.     #:use-module (gnu packages pkg-config))
  13.  
  14. (define-public myraylib
  15.   (package
  16.    (name "myraylib")
  17.    (version "5.0")
  18.    (source (origin
  19.             (method git-fetch)
  20.             (uri (git-reference
  21.                   (url "https://github.com/raysan5/raylib/")
  22.                   (commit version)))
  23.             (file-name (git-file-name name version))
  24.             ;; TODO: Unbundle src/external
  25.             (sha256
  26.              (base32
  27.               "0327licmylwlh5iyzw35pq7ci2d15rp3jms5i9p0vfg1rlv2sjw0"))))
  28.      (build-system gnu-build-system)
  29.      (arguments
  30.     (list #:make-flags
  31.                     #~(list "ROOT=root"
  32.                                     (string-append "DESTDIR=" #$output)
  33.                                    
  34.                                     "RAYLIB_LIBTYPE=SHARED"
  35.                                     "USE_EXTERNAL_GLFW=TRUE"
  36.                                    
  37.                                     )
  38.                     #:phases
  39.                     #~(modify-phases %standard-phases
  40.                                                      (delete 'configure) ; no configure script
  41.                                                      (add-before 'build 'change-to-src-directory
  42.                                                                              (lambda _
  43.                                                                                  (chdir "src")
  44.                                                                                  #t))
  45.                                                      (add-before 'install 'substitute-ldconfig
  46.                                        (lambda* (#:key inputs outputs #:allow-other-keys)
  47.                                          (substitute* "Makefile"
  48.                                                       (("ldconfig") "ldconfig -n"))
  49.                                          #t)))
  50.                    
  51.                     #:tests? #f))
  52.    (inputs (list glfw))
  53.    (native-inputs (list pkg-config))
  54.    (synopsis "C library for videogame programming")
  55.    (description
  56.     "raylib is THE GOAT high-level library for video game programming.  It aims to
  57.  abstract away platform and graphics details, allowing you to focus on
  58.  writing your game.")
  59.    (home-page "https://www.raylib.com/")
  60.    (license zlib)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement