summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Tai <atai@atai.org>2024-04-22 22:51:48 -0700
committerGuix Patches Tester <>2024-04-23 10:04:16 +0200
commite63c4302d9755640ed75434ff5d8ef5c68674c96 (patch)
treea6ff1fa78cc7b0014cead4115bb54f21f318166f
parentaf4db17122d759705f3fd0ab03ef36c76ec90338 (diff)
downloadguix-patches-e63c4302d9755640ed75434ff5d8ef5c68674c96.tar
guix-patches-e63c4302d9755640ed75434ff5d8ef5c68674c96.tar.gz
gnu: Add bx
* gnu/packages/graphics.scm (bx): New variable Change-Id: I7a0b4ccfb2e7a1edad80da0ba55fa5cd0fca0032
-rw-r--r--gnu/packages/graphics.scm60
1 files changed, 59 insertions, 1 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index ca2d74224f..b64774af58 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -24,7 +24,7 @@
;;; Copyright © 2020, 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared@gmail.com>
;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
-;;; Copyright © 2021 Andy Tai <atai@atai.org>
+;;; Copyright © 2021, 2024 Andy Tai <atai@atai.org>
;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de>
@@ -2893,6 +2893,64 @@ glTF, STL, STEP, PLY, OBJ, FBX), and provides numerous rendering and texturing
options.")
(license license:bsd-3)))
+(define-public bx
+ (let ((commit "d3434707384f6d62229a4476b10b6dc22fee7c9a")
+ (revision "1"))
+ (package
+ (name "bx")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bkaradzic/bx")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "11jii8dfb0nzxamkffa6ij3p6r4w7csfbxw7wpxsmqhirv5i8rns"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+
+ (replace 'build
+ (lambda _
+ (invoke "make"
+ "-j" (number->string (parallel-job-count))
+ "linux-release64"
+ (string-append "GENIE="
+ #$(this-package-native-input
+ "genie") "/bin/genie") "-j"
+ (number->string (parallel-job-count)))))
+
+ (replace 'check
+ (lambda _
+ (invoke "make" "test")))
+ (replace 'install
+ (lambda _
+ (install-file
+ ".build/linux64_gcc/obj/x64/Release/bin2c/tools/bin2c"
+ (string-append #$output "/bin"))
+ (install-file
+ ".build/linux64_gcc/obj/x64/Release/lemon/tools/lemon"
+ (string-append #$output "/bin"))
+ (for-each (lambda (f)
+ (install-file f
+ (string-append #$output
+ "/lib")))
+ (find-files ".build/linux64_gcc" "\\.a$"))
+ (copy-recursively "include/bx"
+ (string-append #$output
+ "/include/bx")))))))
+ (native-inputs (list genie))
+ (home-page "https://github.com/bkaradzic/bx")
+ (synopsis "Base library used across multiple projects ")
+ (description
+ "Bx is an base library that implements low level functions of the
+Bgfx graphics library.")
+ (license license:bsd-2))))
+
(define-public gpaint
(package
(name "gpaint")