unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Hartmut Goebel <h.goebel@crazy-compilers.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH v4] gnu: Add teensy-loader-cli.
Date: Sat, 04 Jun 2016 23:30:55 +0200	[thread overview]
Message-ID: <87inxowsj4.fsf@gnu.org> (raw)
In-Reply-To: <1464863708-18392-1-git-send-email-h.goebel@crazy-compilers.com> (Hartmut Goebel's message of "Thu, 2 Jun 2016 12:35:07 +0200")

Hi!

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> * gnu/packages/flashing-tools.scm (teensy-loader-cli): New variable.

I’m sorry for the extra round trip…  Last one, I promise!  :-)

> +  (let* ((commit "f289b7a2e5627464044249f0e5742830e052e360")
> +         ;; Mind changing the version in the usage-message below when changing
> +         (version (string-append "2.1-1." (string-take commit 7))))

This ‘version’ variable is really unneeded, because:

  (package
    (name "foo")
    (version "bar")
    …)

in fact expands to:

  (let ((name "foo") (version "bar") …)
    (make-struct <package> name version …))

This is done precisely so we can refer to field values.

So please remove the ‘version’ variable.  :-)

> +  (package

Add two columns to the indentation.

> +           ;; remove example flash files
> +           (for-each delete-file (find-files "." "\\.hex$"))
> +           ;; Remove teensy rebooter flash binaries
> +           (for-each delete-file (find-files "rebootor" "\\.(elf|hex)$"))

This is equivalent to:

  (find-files "." "\\.(elf|hex)")

because ‘find-files’ is recursive.

Also, please write sentences that start with a capital letter and finish
with a period.

> +           ;; fix the version
> +           (substitute* "teensy_loader_cli.c"
> +             (("Teensy Loader, Command Line, Version 2.0\\\\n")
> +              ;; TODO: find a way to pass the version from above
> +              (string-append "Teensy Loader, Command Line, Version 2.1-1\\n")))

Refer to ‘version’ here instead of hard-coding it:

  (snippet
    `(begin   ; <- note the backquote here, aka. “quasiquote”
       …
       (substitute* …
         (string-append "foo" ,version "\n"))))

> +    (synopsis "Command line firmware uploader for teensy development boards")

s/teensy/Teensy/

> diff --git a/gnu/packages/patches/teensy-loader-cli-usage.patch b/gnu/packages/patches/teensy-loader-cli-usage.patch
> new file mode 100644
> index 0000000..097c61e

Please add an explanation and the upstream status to the beginning of
the patch.

Could you send one last version of the patch please?

Thank you, and apologies to taking so long and being so picky!  ;-)

Ludo’.

  parent reply	other threads:[~2016-06-04 21:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 10:35 [PATCH v4] gnu: Add teensy-loader-cli Hartmut Goebel
2016-06-02 10:35 ` [PATCH] " Hartmut Goebel
2016-06-04 21:30 ` Ludovic Courtès [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-12 18:03 [PATCH v4] " Hartmut Goebel
2016-06-13 20:41 ` Leo Famulari
2016-06-14 10:32   ` Hartmut Goebel

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=87inxowsj4.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.com \
    /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).