all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jelle Licht <wordempire@gmail.com>
To: Dylan Jeffers <sapientech@openmailbox.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] python-kivy and Adobe source-code-pro font
Date: Mon, 08 Aug 2016 00:24:11 +0200	[thread overview]
Message-ID: <87invcp69g.fsf@gmail.com> (raw)
In-Reply-To: <20160805193516.18edfdd9@openmailbox.org>


Dylan Jeffers <sapientech@openmailbox.org> writes:

> Hi all,
>
Hello Dylan,

Thanks for this patch! I love the source-code-pro font :).

> First patch to guix-devel; tried my best to conform to the guidelines.

Guix (usually) has a one commit per change policy. Contributions in guix
usually follow a specific format. You might want to review the
guidelines as specified in the manual, which one can find online or by
executing
  `info -f doc/guix.info "(guix) Contributing"`
in a guix git checkout. 
> Couldn't fix some "abiguous package" issues with
> font-adobe-source-code-pro package. Let me know if someone finds a
> solution.

I am not quite sure what "ambiguous package" issues you are talking
about. Are you referring to "collision encountered" warnings?


I added your patch inline with some observations;
> From db8338214f57249f7f513d9b27b6f31ae6cea345 Mon Sep 17 00:00:00 2001
> From: Dylan Jeffers <sapientech@openmailbox.org>
> Date: Fri, 5 Aug 2016 18:37:34 -0700
> Subject: [PATCH] Add python-kivy and adobe source-code-pro font

Guix follows the CHANGELOG[0] format for commit messages. You can check the
commit history for examples of how to phrase certain common changes.

> 
> ---
>  gnu/packages/fonts.scm  | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
>  gnu/packages/python.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 102 insertions(+)
> 
> diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
> index 9b2281a..fa8420e 100644
> --- a/gnu/packages/fonts.scm
> +++ b/gnu/packages/fonts.scm
> @@ -414,6 +414,55 @@ The Liberation Fonts are sponsored by Red Hat.")
>  for long (8 and more hours per day) work with computers.")
>      (license license:silofl1.1)))
>  
> +(define-public font-adobe-source-code-pro
> +  (package
> +    (name "font-adobe-source-code-pro")
> +    (version "2.030")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "https://github.com/adobe-fonts/source-code-pro/archive/"
> +                    version "R-ro/1.050R-it.tar.gz"))
> +              (sha256
> +               (base32
> +                "0arhhsf3i7ss39ykn73d1j8k4n8vx7115xph6jwkd970p1cxvr54"))))
> +    (build-system trivial-build-system)
> +    (arguments
> +     `(#:modules ((guix build utils))
> +       #:builder
> +         (begin
> +           (use-modules (guix build utils))
> +           (let ((tar  (string-append (assoc-ref %build-inputs
> +                                                 "tar")
> +                                      "/bin/tar"))
> +                 (PATH (string-append (assoc-ref %build-inputs
> +                                                 "gzip")
> +                                      "/bin"))
> +                 (font-dir (string-append
> +                            %output "/share/fonts/truetype")))
> +             (setenv "PATH" PATH)
> +             (system* tar "xvf" (assoc-ref %build-inputs "source"))
> +             (mkdir-p font-dir)
> +             (chdir (string-append "source-code-pro-" ,version
> +                                   "R-ro-1.050R-it/TTF/"))
> +             (for-each (lambda (ttf)
> +                         (copy-file ttf
> +                                    (string-append font-dir "/"
> +                                                   (basename ttf))))
> +                       (find-files "." "\\.ttf$"))))))
Here you install all the ttf files ...
> +    (native-inputs
> +     `(("gzip" ,gzip)
> +       ("tar" ,tar)))
> +    (home-page "https://adobe-fonts.github.io/source-code-pro/")
> +    (synopsis "Source-Code-Pro fonts")
> +    (description
> +     "Source Code Pro is a set of OpenType fonts that have been designed
> +to work well in user interface (UI) environments.  In addition to a
> +functional OpenType font, this open source project provides all of the
> +source files that were used to build this OpenType font by using the
> +AFDKO makeotf tool.")
... and here you mention the source of these ttf files also being
available in the package (which you do not seem to install). Best case
scenario would be if we can generate the ttf files ourselves from these
sources. I had a brief look at AFDKO, and IMHO the build procedure seems
quite complicated. Right now, I would remove the part about the source
files and AFDKO from the description.

> +    (license license:silofl1.1)))
> +
>  (define-public font-adobe-source-han-sans
>    (package
>      (name "font-adobe-source-han-sans")
> @@ -865,3 +914,5 @@ powerline support.")
>      (license (license:x11-style
>                "https://github.com/chrissimpkins/Hack/blob/master/LICENSE.md"
>                "Hack Open Font License v2.0"))))
> +
> +
These added newlines seem superfluous

> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 470bad8..2cdc398 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -88,10 +88,15 @@
>    #:use-module (gnu packages tcl)
>    #:use-module (gnu packages bdw-gc)
>    #:use-module (gnu packages pcre)
> +  #:use-module (gnu packages gstreamer)
> +  #:use-module (gnu packages gl)
> +  #:use-module (gnu packages sdl)
> +  #:use-module (gnu packages video)
>    #:use-module (guix packages)
>    #:use-module (guix download)
>    #:use-module (guix git-download)
>    #:use-module (guix utils)
> +  #:use-module (guix build utils)
>    #:use-module (guix build-system gnu)
>    #:use-module (guix build-system cmake)
>    #:use-module (guix build-system python)
> @@ -9808,3 +9813,49 @@ etc.")
>      (package
>        (inherit base)
>        (name "ptpython2"))))
> +
> +
One of these newlines can be removed.

> +(define-public python-kivy
> +  (package
> +    (name "python-kivy")
> +    (version "1.9.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "kivy" version))
> +       (sha256
> +        (base32
> +         "0zk3g1j1z0lzcm9d0k1lprrs95zr8n8k5pdg3p5qlsn26jz4bg19"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:tests? #f                      ; tests require many more packages

NOTE: I am not a pythonista, but could you not disable subset of the
tests that depend on many more packages? Or maybe elaborate a bit more
one why exactly testing this package is not worth it. See the
python-drmaa for example.

> +                #:phases
> +                (modify-phases
> +                    %standard-phases
> +                  (add-after 'patch-generated-file-shebangs 'set-sdl-paths
> +                    (lambda* (#:key inputs #:allow-other-keys)
> +                      (setenv "KIVY_SDL2_PATH"
> +                              (string-append (assoc-ref inputs "sdl-union")
> +                                             "/include/SDL2")))))))
Something funky seems to be going on with the indention here. I usually
let emacs' scheme mode take care of the indentation for me using the
`indent-region` command. I assume the KIVY_SDL2_PATH is required for
kivy to build correctly? 

> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(
> +       ("python-cython" ,python-cython)
You can join the previous two lines, so you get `(("python-cython <etc> 

> +       ("gstreamer" ,gstreamer)
> +       ("mesa" ,mesa)
> +       ("sdl-union"
> +        ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
> +    (home-page "http://kivy.org")
> +    (synopsis
> +     "Open-source multitouch application framework")
Guix and its packaged software are Free Software projects, and as such,
the 'open-sourceness' of this package are implied by the greater
implications of it already being Free Software. 

> +    (description
> +     "A software library for rapid development of
> +hardware-accelerated multitouch applications.")
> +    (license bsd-3)))
Unless I am mistaken, Kivy is licensed under the "MIT" (Expat) license.
> +
> +(define-public python2-kivy
> +  (let ((base (package-with-python2 (strip-python2-variant python-kivy))))
> +    (package
> +      (inherit base)
> +      (name "python2-kivy"))))
> -- 
> 2.7.3
>
> More packages to come!
> Dylan

Looking forward to your other contributions!

Regards,
- Jelle

[0]: https://www.gnu.org/prep/standards/html_node/Change-Logs.html

  reply	other threads:[~2016-08-07 22:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-06  2:35 [PATCH] python-kivy and Adobe source-code-pro font Dylan Jeffers
2016-08-07 22:24 ` Jelle Licht [this message]
2016-08-09  3:56 ` Leo Famulari
2016-08-10 18:42 ` Mark H Weaver
2016-08-10 19:49   ` Mark H Weaver
2016-08-10 20:08   ` Alex Griffin
2016-08-10 21:05     ` Mark H Weaver
2016-08-10 21:09     ` Leo Famulari
2016-08-10 22:14       ` Alex Griffin
2016-08-11  2:53   ` Dylan Jeffers

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

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

  git send-email \
    --in-reply-to=87invcp69g.fsf@gmail.com \
    --to=wordempire@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=sapientech@openmailbox.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.