unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Leo Prikler <leo.prikler@student.tugraz.at>
Cc: 37714@debbugs.gnu.org
Subject: [bug#37714] Add renpy package
Date: Fri, 18 Oct 2019 21:49:41 +0200	[thread overview]
Message-ID: <87d0et96lm.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <d1b5749c53db9fd174a64b1d26272b3517f769d5.camel@student.tugraz.at> (Leo Prikler's message of "Sat, 12 Oct 2019 09:20:56 +0200")

Hello,

Leo Prikler <leo.prikler@student.tugraz.at> writes:

> This patch adds the Ren'py Visual Novel engine split into four
> outputs:

Great! It was on my TODO list, too.

> - "out": contains the engine itself. Since Guix differs strongly from
> the platforms Ren'py usually runs on, we ship our own Ren'py main file.
> - "launcher": The Ren'py launcher, that people would normally expect
> when invoking renpy -- it does not seem very usable in Guix, though.

What do you mean?

> * gnu/packages/game-development: (python2-pygame-for-renpy): New procedure.
> (python2-renpy): New variable.

New variable for both in enough, I think.

> +(define (python2-pygame-for-renpy version hash)
> +  (package
> +   (inherit python2-pygame)
> +   (name "python2-pygame-for-renpy")
> +   (version version)
> +    (source
> +     (origin
> +      (method git-fetch)
> +      (uri (git-reference
> +            (url "https://github.com/renpy/pygame_sdl2.git")
> +            (commit (string-append "renpy-" version))))

Upstream provides a tarball for that:

  https://www.renpy.org/dl/7.3.5/pygame_sdl2-2.1.0-for-renpy-7.3.5.tar.gz

I think it is preferable using it than pointing to Github.

> +      (sha256
> +       (base32
> +        hash))

Nitpick: At least bash32 and hash could go on the same line.

> +    (home-page "http://www.renpy.org/")
> +    (synopsis "Reimplementation of the Pygame API using SDL2")

The description field is missing. Could you add one?

> +(define-public python2-renpy

"python2" prefix is for libraries. I think this one can be called
"renpy".

> +  (package
> +   (name "python2-renpy")
> +   (version "7.3.4.596")

I noticed 7.3.5 is out. Could you update it?

> +    (source
> +     (origin
> +      (method git-fetch)
> +      (uri (git-reference
> +            (url "https://github.com/renpy/renpy.git")
> +            (commit version)))

As above, I suggest to use tarball from main site:

  https://www.renpy.org/dl/7.3.5/renpy-7.3.5-source.tar.bz2

> +         (replace 'build
> +           (lambda args
> +             (apply
> +              (lambda* (build-root #:key inputs outputs #:allow-other-keys)
> +                (chdir "module")
> +                (apply (assoc-ref %standard-phases 'build) args)
> +                (chdir build-root)
> +                (delete-file "renpy/__init__.pyc")
> +                (invoke "python" "-m" "compileall" "renpy"))
> +              (getcwd) args)
> +             #t))

This is a bit confusing because you're not really replacing `build'
phase, but wrapping stuff around it. I think it may be better to add
a `before-build' and an `after-build' phases, adding comments, if
possible, to explain why they are needed.

> +         (replace 'install
> +           (lambda args
> +             (apply
> +              (lambda* (build-root #:key inputs outputs #:allow-other-keys)
> +                (let* ((pygame (assoc-ref inputs "python2-pygame"))
> +                       (out (assoc-ref outputs "out"))
> +                       (site (string-append "/lib/python"
> +                                            ,(version-major+minor
> +                                              (package-version python-2))
> +                                            "/site-packages")))
> +                  (chdir "module")
> +                  (apply (assoc-ref %standard-phases 'install) args)
> +                  (chdir build-root)
> +                  (copy-recursively "renpy"
> +                                    (string-append out site "/renpy"))))
> +              (getcwd) args)
> +             #t))

See above. It might be more readable to use one phase before, and one
after.

> +    (inputs
> +     `(("ffmpeg" ,ffmpeg)
> +       ("freetype" ,freetype)
> +       ("glew" ,glew)
> +       ("libpng" ,libpng)
> +       ("sdl-union"
> +        ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))
> +       ("python" ,python)))

So it needs both Python 2 and Python 3?

Could you order alphabetically the inputs?

> +    (outputs
> +     (list "out" "launcher" "tutorial" "the-question"))
> +    (propagated-inputs
> +     `(("python2-pygame"
> +        ,(python2-pygame-for-renpy
> +          version
> +          "1gwbqkyv7763813x7nmzb3nz4r8673d33ggsp6lgp1d640rimlpb"))))

Could you see if there's a way to not propagate this input? What happens
if it is a simple input?

> +    (native-inputs
> +     `(("python2-cython" ,python2-cython)))
> +    (home-page "http://www.renpy.org/")
> +    (synopsis "The Ren'Py Visual Novel Engine -- libary files")
> +    (description "Ren'Py is a visual novel engine -- used by thousands of
> +creators from around the world -- that helps you use words, images, and sounds
> +to tell interactive stories that run on computers and mobile devices. These can
> +be both visual novels and life simulation games. The easy to learn script
> +language allows anyone to efficiently write large visual novels, while its
> +Python scripting is enough for complex simulation games.")

You need to add two spaces at the end of sentences.

> +    (license license:x11)))

I this should be license:expat.

Could you send an updated patch?

Thank you for the work.


Regards,

-- 
Nicolas Goaziou

  parent reply	other threads:[~2019-10-18 19:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12  7:20 [bug#37714] Add renpy package Leo Prikler
2019-10-14  9:00 ` Leo Prikler
2019-10-18 19:49 ` Nicolas Goaziou [this message]
2019-10-19 20:59   ` Leo Prikler
2019-10-20 12:09     ` Leo Prikler
2019-10-21  7:26       ` Nicolas Goaziou
2019-10-21  7:35         ` Leo Prikler
2019-10-29 23:04           ` bug#37714: " Nicolas Goaziou
2019-10-30  9:16             ` [bug#37714] " Leo Prikler
2019-10-30 13:45               ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0et96lm.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=37714@debbugs.gnu.org \
    --cc=leo.prikler@student.tugraz.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).