Re: [PATCH 1/1] gnu: Add Anonymous Pro fonts.

2015-09-06 Thread Alex Kost
Leo Famulari (2015-09-05 22:06 +0300) wrote:

> On Sat, Sep 5, 2015, at 09:34, Alex Kost wrote:
[...]
>> Otherwise, LGTM.  So if there will be no other comments and objections
>> on the package name, I will push it.  No need to resend the patch — I'll
>> fix these small issues I mentioned.  Thank you.
>
> I think the package name is fine. Thank you!

Yeah, I agree.  Since Andreas didn't object, I have pushed this patch,
thanks.

-- 
Alex



Re: [PATCH 1/1] gnu: Add Anonymous Pro fonts.

2015-09-05 Thread Leo Famulari


On Sat, Sep 5, 2015, at 09:34, Alex Kost wrote:
> Leo Famulari (2015-09-04 00:53 +0300) wrote:
> > +(source (origin
> > + (method url-fetch)
> > + (uri (string-append 
> > "http://www.marksimonson.com/assets/content/fonts/;
> 
> This line is too long, we prefer to stay within 78 chars.  I would make
> it:
> 
>  (string-append
>   "http://www.marksimonson.com/assets/content/fonts/;
> 
> > + "AnonymousPro-" version ".zip"))
> > + (sha256
> > +  (base32 
> > "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"
> 
> Such (base32 "…") lines also look too long for me, so I prefer to move a
> hash on another line (but some people leave it this way).

I thought that lint would catch those, sorry.
 
> > +   (for-each (lambda (ttf)
> > +   (copy-file ttf
> > +  (string-append font-dir "/" ttf)))
> > + (find-files "." "\\.ttf$"))
> > +   (for-each (lambda (doc)
> > +   (copy-file doc
> > +  (string-append doc-dir "/" doc)))
> > +   (find-files "." "\\.txt$"))
> 
> This (find-files …) should be shifted 2 chars left (the same as
> 'find-files' in the previous 'for-each').

No excuse there, sorry again.
 
> Otherwise, LGTM.  So if there will be no other comments and objections
> on the package name, I will push it.  No need to resend the patch — I'll
> fix these small issues I mentioned.  Thank you.

I think the package name is fine. Thank you!



Re: [PATCH 1/1] gnu: Add Anonymous Pro fonts.

2015-09-05 Thread Alex Kost
Leo Famulari (2015-09-04 00:53 +0300) wrote:

> * gnu/packages/fonts.scm (font-anonymous-pro): New variable.
> ---
>  gnu/packages/fonts.scm | 42 ++
>  1 file changed, 42 insertions(+)
>
>
> diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
> index a78995c..75e6fe8 100644
> --- a/gnu/packages/fonts.scm
> +++ b/gnu/packages/fonts.scm
> @@ -524,3 +524,45 @@ distributed with Ghostscript version 4.00.  The 
> collection contains the
>  following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
>  Heros, Pagella, Schola, Termes.")
>  (license license:gfl1.0)))
> +
> +(define-public font-anonymous-pro
> +  (package
> +(name "font-anonymous-pro")
> +(version "1.002")
> +(source (origin
> + (method url-fetch)
> + (uri (string-append 
> "http://www.marksimonson.com/assets/content/fonts/;

This line is too long, we prefer to stay within 78 chars.  I would make it:

 (string-append
  "http://www.marksimonson.com/assets/content/fonts/;

> + "AnonymousPro-" version ".zip"))
> + (sha256
> +  (base32 
> "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"

Such (base32 "…") lines also look too long for me, so I prefer to move a
hash on another line (but some people leave it this way).

> +(build-system trivial-build-system)
> +(arguments
> + `(#:modules ((guix build utils))
> +   #:builder
> +   (begin
> + (use-modules (guix build utils))
> + (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
> + "/bin/unzip"))
> +   (font-dir (string-append %output "/share/fonts/truetype"))
> +   (doc-dir  (string-append %output "/share/doc/" ,name)))
> +   (system* unzip (assoc-ref %build-inputs "source"))
> +   (mkdir-p font-dir)
> +   (mkdir-p doc-dir)
> +   (chdir (string-append "AnonymousPro-" ,version ".001"))
> +   (for-each (lambda (ttf)
> +   (copy-file ttf
> +  (string-append font-dir "/" ttf)))
> + (find-files "." "\\.ttf$"))
> +   (for-each (lambda (doc)
> +   (copy-file doc
> +  (string-append doc-dir "/" doc)))
> +   (find-files "." "\\.txt$"))

This (find-files …) should be shifted 2 chars left (the same as
'find-files' in the previous 'for-each').

Otherwise, LGTM.  So if there will be no other comments and objections
on the package name, I will push it.  No need to resend the patch — I'll
fix these small issues I mentioned.  Thank you.

-- 
Alex



[PATCH 1/1] gnu: Add Anonymous Pro fonts.

2015-09-03 Thread Leo Famulari
* gnu/packages/fonts.scm (font-anonymous-pro): New variable.
---
 gnu/packages/fonts.scm | 42 ++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index a78995c..75e6fe8 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -524,3 +524,45 @@ distributed with Ghostscript version 4.00.  The collection 
contains the
 following fonts in the OpenType format: Adventor, Bonum, Chorus, Cursor,
 Heros, Pagella, Schola, Termes.")
 (license license:gfl1.0)))
+
+(define-public font-anonymous-pro
+  (package
+(name "font-anonymous-pro")
+(version "1.002")
+(source (origin
+ (method url-fetch)
+ (uri (string-append 
"http://www.marksimonson.com/assets/content/fonts/;
+ "AnonymousPro-" version ".zip"))
+ (sha256
+  (base32 
"1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"
+(build-system trivial-build-system)
+(arguments
+ `(#:modules ((guix build utils))
+   #:builder
+   (begin
+ (use-modules (guix build utils))
+ (let ((unzip (string-append (assoc-ref %build-inputs "unzip")
+ "/bin/unzip"))
+   (font-dir (string-append %output "/share/fonts/truetype"))
+   (doc-dir  (string-append %output "/share/doc/" ,name)))
+   (system* unzip (assoc-ref %build-inputs "source"))
+   (mkdir-p font-dir)
+   (mkdir-p doc-dir)
+   (chdir (string-append "AnonymousPro-" ,version ".001"))
+   (for-each (lambda (ttf)
+   (copy-file ttf
+  (string-append font-dir "/" ttf)))
+ (find-files "." "\\.ttf$"))
+   (for-each (lambda (doc)
+   (copy-file doc
+  (string-append doc-dir "/" doc)))
+   (find-files "." "\\.txt$"))
+(native-inputs
+ `(("unzip" ,unzip)))
+(home-page "http://www.marksimonson.com/fonts/view/anonymous-pro;)
+(synopsis "Fixed-width fonts designed with coding in mind")
+(description "Anonymous Pro is a family of four fixed-width fonts designed
+with coding in mind.  Anonymous Pro features an international, Unicode-based
+character set, with support for most Western and Central European Latin-based
+languages, plus Greek and Cyrillic.")
+(license license:silofl1.1)))
-- 
2.4.3