guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] gnu: Add teensy-loader-cli.


From: Ludovic Courtès
Subject: Re: [PATCH v4] gnu: Add teensy-loader-cli.
Date: Sat, 04 Jun 2016 23:30:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi!

Hartmut Goebel <address@hidden> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]