diff mbox series

[bug#50229] gnu: Add genie

Message ID CAJsg1E92mDu_Se05Obse+QL5aTuSXKJ6-ZWirrsTBCCuLAuKwQ@mail.gmail.com
State New
Headers show
Series [bug#50229] gnu: Add genie | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Andy Tai Aug. 27, 2021, 5:29 p.m. UTC
* gnu/packages/build-tools.scm (genie): New variable
---
 gnu/packages/build-tools.scm | 37 ++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Andy Tai Aug. 29, 2021, 3:19 a.m. UTC | #1
regarding genie: it is a build system used by bgfx and some other
projects in game and related area, so needs to make it in guix first
for these packages to use when included in guix
Sarah Morgensen Aug. 31, 2021, 4:56 a.m. UTC | #2
Hi,

Thanks for the patch.  Just a couple quick notes:

Andy Tai <lichengtai@gmail.com> writes:

> * gnu/packages/build-tools.scm (genie): New variable
> ---
>  gnu/packages/build-tools.scm | 37 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>
> diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
> index d2fb9e05df..456d9583bc 100644
> --- a/gnu/packages/build-tools.scm
> +++ b/gnu/packages/build-tools.scm
> @@ -14,6 +14,7 @@
>  ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
>  ;;; Copyright © 2021 qblade <qblade@protonmail.com>
>  ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> +;;; Copyright © 2021 Andy Tai <atai@atai.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -584,3 +585,39 @@ Build has features such as:
>  @item Extensible language/compiler framework.
>  @end itemize")
>      (license license:gpl2+)))
> +
> +(define-public genie
> +  (let ((commit "5fecb127855ee069df345f20d17fea78220fee93")
> +        (revision "0"))
> +    (package
> +        (name "genie")
> +        (version
> +          (git-version "0" revision commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri
> +          (git-reference
> +           (url "https://github.com/bkaradzic/genie")
> +           (commit commit)))

It looks like genie bundles lua 5.3.0, can this be removed since we have
a lua 5.3 package?

> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32
> +           "1fl00w4v2wigl2fypvnpzmny2x4f0adb7ncsn4a6w7gwxfxvl51j"))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       `(#:phases
> +          (modify-phases %standard-phases
> +          (delete 'configure)

Does CC need to be set to support cross-compilation like in premake4? (I
haven't tested either way.)

> +          (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((outdir (assoc-ref outputs "out")))
> +               (install-file "bin/linux/genie" (string-append outdir "/bin")))
> +               #t)))
> +         #:tests? #f)) ;; no tests

There's a 'tests' folder in the source, so is this true? :)

> +      (home-page "https://github.com/bkaradzic/GENie")
> +      (synopsis  "project generator tool")
> +      (description "GENie (pronounced as Jenny) is project generator tool.
                              ^ pronounced "Jenny"

> +It automagically generates project from Lua script,

Looking at the project description, perhaps "project files" or "project
build scripts" would be more clear?  As well as specifying the different
systems (Makefile, ...) it supports.

> +making applying the same settings for multiple projects easy..")
                                                  extra period ^

> +      (license license:bsd-3))))

According to LICENSE, the majority of the project is under BSD-3, but
inspect.lua and profiler.lua are expat.

--
Sarah
Andy Tai Sept. 2, 2021, 1:02 a.m. UTC | #3
I will take a look of the comments. Thanks
diff mbox series

Patch

diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index d2fb9e05df..456d9583bc 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -14,6 +14,7 @@ 
 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Andy Tai <atai@atai.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -584,3 +585,39 @@  Build has features such as:
 @item Extensible language/compiler framework.
 @end itemize")
     (license license:gpl2+)))
+
+(define-public genie
+  (let ((commit "5fecb127855ee069df345f20d17fea78220fee93")
+        (revision "0"))
+    (package
+        (name "genie")
+        (version
+          (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/bkaradzic/genie")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1fl00w4v2wigl2fypvnpzmny2x4f0adb7ncsn4a6w7gwxfxvl51j"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+          (modify-phases %standard-phases
+          (delete 'configure)
+          (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((outdir (assoc-ref outputs "out")))
+               (install-file "bin/linux/genie" (string-append outdir "/bin")))
+               #t)))
+         #:tests? #f)) ;; no tests
+      (home-page "https://github.com/bkaradzic/GENie")
+      (synopsis  "project generator tool")
+      (description "GENie (pronounced as Jenny) is project generator tool.
+It automagically generates project from Lua script,
+making applying the same settings for multiple projects easy..")
+      (license license:bsd-3))))