diff options
author | Andy Tai <atai@atai.org> | 2024-05-17 23:22:56 -0700 |
---|---|---|
committer | Guix Patches Tester <> | 2024-05-18 09:15:31 +0200 |
commit | b3a01613fd5a386e129beed9e11f71ccb313f694 (patch) | |
tree | 9f9888401573a8151aa94d9f68b2e0f024fd5958 | |
parent | fce4976e1e2e007eda320669decd58d966624c03 (diff) | |
download | guix-patches-b3a01613fd5a386e129beed9e11f71ccb313f694.tar guix-patches-b3a01613fd5a386e129beed9e11f71ccb313f694.tar.gz |
gnu: Add bimg.
* gnu/packages/graphics.scm (bimg): New variable.
Change-Id: I431bed18c6a63d8b6c073177c01816fd32e005f4
-rw-r--r-- | gnu/packages/graphics.scm | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 5522fffcc8..678e916b7c 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -3023,6 +3023,72 @@ to be able to write cross-platform applications. @end itemize") (license license:bsd-2)))) +(define-public bimg + (let ((commit "e9fa0ceff2df3399011af136c82652c81655c1d3") + (revision "1")) + (package + (name "bimg") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bkaradzic/bimg") + (commit commit))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (sha256 + (base32 "0i80r5hwbnh94wfmv4dys6kmy7szvmpqynbb7bvvvhfjn13jh754")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ;there are no tests + #:phases #~(modify-phases %standard-phases + (delete 'configure) + + (replace 'build + (lambda _ + (for-each (lambda (target) + (invoke "make" + "-j" + (number->string (parallel-job-count)) + target + + (string-append "BX_DIR=" + #$(this-package-input + "bx-sources")) + (string-append "NINJA=" + #$(this-package-native-input + "ninja") + "/bin/ninja") + (string-append "GENIE=" + #$(this-package-native-input + "genie") + "/bin/genie"))) + (list "linux-release64" "tools")))) + + (replace 'install + (lambda _ + (install-file + ".build/linux64_gcc/obj/x64/Release/texturec/tools/texturec" + (string-append #$output "/bin")) + (for-each (lambda (f) + (install-file f + (string-append #$output + "/lib"))) + (find-files ".build/linux64_gcc" "\\.a$")) + (copy-recursively "include/bimg" + (string-append #$output + "/include/bimg"))))))) + (native-inputs (list genie ninja)) + (inputs `(("bx-sources" ,(package-source bx)))) + (home-page "https://github.com/bkaradzic/bimg") + (synopsis "Image library") + (description + "Bimg is an imaging library that implements low level functions of the +Bgfx graphics library.") + (license license:bsd-2)))) + (define-public gpaint (package (name "gpaint") |