summaryrefslogtreecommitdiff
path: root/packages/komodo/antara-gaming-sdk.scm
diff options
context:
space:
mode:
Diffstat (limited to 'packages/komodo/antara-gaming-sdk.scm')
-rw-r--r--packages/komodo/antara-gaming-sdk.scm46
1 files changed, 45 insertions, 1 deletions
diff --git a/packages/komodo/antara-gaming-sdk.scm b/packages/komodo/antara-gaming-sdk.scm
index 956cdb2..8f2137c 100644
--- a/packages/komodo/antara-gaming-sdk.scm
+++ b/packages/komodo/antara-gaming-sdk.scm
@@ -1,6 +1,11 @@
(define-module (antara-gaming-sdk)
+ #:use-module (doom-meta)
+ #:use-module (gnu packages game-development)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages pretty-print)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses)
#:prefix license:)
@@ -18,10 +23,47 @@
(define antara-gaming-sdk-hash
(content-hash "12jqg0y92y86lm0516k06x81zrargfgvby10kxmhj1vaxkf71ig6"))
+(define antara-gaming-sdk-native-inputs
+ (list doom-meta entt fmt))
+
(define antara-gaming-sdk-version "1.1.0-alpha")
+(define find-entt "find_package(EnTT)\n")
+
+(define find-fmt "find_package(fmt)\n")
+
+;;; ABSTRACTION LAYER -4
+
+(define find-package-calls
+ (string-append "Dependancies\n" "\n" find-fmt find-entt "\n"))
+
+;;; ABSTRACTION LAYER -3
+
+(define find-more-packages
+ `(substitute* "cmake/dependencies.cmake"
+ (("Dependancies") ,find-package-calls)))
+
+(define rename-doom-targets
+ `(substitute* (list "modules/math/CMakeLists.txt"
+ "modules/event/CMakeLists.txt"
+ "modules/ecs/CMakeLists.txt")
+ (("doom::meta") "doom")))
+
+;;; ABSTRACTION LAYER -2
+
+(define patch-cmake
+ `(lambda _
+ ,find-more-packages
+ ,rename-doom-targets))
+
;;; ABSTRACTION LAYER -1
+(define antara-gaming-sdk-phases
+ `(modify-phases %standard-phases
+ (add-after 'unpack
+ 'patch-cmake
+ ,patch-cmake)))
+
(define antara-gaming-sdk-git-reference
(git-reference (url antara-gaming-sdk-github)
(commit antara-gaming-sdk-version)))
@@ -29,7 +71,8 @@
;;; ABSTRACTION LAYER 0
(define antara-gaming-sdk-arguments
- (list #:configure-flags antara-gaming-sdk-configure-flags))
+ `(#:phases ,antara-gaming-sdk-phases
+ #:configure-flags ,antara-gaming-sdk-configure-flags))
(define antara-gaming-sdk-origin
(origin (uri antara-gaming-sdk-git-reference)
@@ -44,6 +87,7 @@
(source antara-gaming-sdk-origin)
(build-system cmake-build-system)
(arguments antara-gaming-sdk-arguments)
+ (native-inputs antara-gaming-sdk-native-inputs)
(synopsis "Komodo Gaming Software Development Kit")
(description "Komodo Gaming Software Development Kit")
(license license:cc-by-sa4.0)