From: "Ludovic Courtès" <ludo@gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
Cc: 35640@debbugs.gnu.org
Subject: bug#35640: Make USB modems just work on Guix
Date: Wed, 15 May 2019 15:01:04 +0200 [thread overview]
Message-ID: <87ef4zvpm7.fsf@gnu.org> (raw)
In-Reply-To: <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Tue, 14 May 2019 22:56:48 +0200")
Hi,
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:
> On Tue, May 14, 2019 at 10:35:55AM +0200, Danny Milosavljevic wrote:
[...]
>> The problem is there's a use-modules cycle somewhere.
>> Try putting usb-modeswitch in another module (a new one if necessary).
>>
>
> Using a new module helps, thank you! Now I also do not need a prefix
> tcl: anymore. @Ludo: without that prefix, I got errors because 'zip
> was redefined or something, I do not remember now.
That could be a collision with ‘zip’ from (srfi srfi-1) or with ‘zlib’
from (guix licenses), which can both be worked around by doing something
along these lines:
#:use-module ((srfi srfi-1) #:hide (zip))
> Now only packaging issues remain. When I use trivial-build-system,
>
> #:builder
> (begin
> (use-modules (guix build utils)
> (guix packages))
> (let ((source (assoc-ref %build-inputs "source"))
> (tar (assoc-ref %build-inputs "tar"))
> (bzip2 (assoc-ref %build-inputs "bzip2"))
> (share-dir (string-append %output "/share")))
> (copy-file source "data.tar.bz2")
> (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2")
> (invoke (string-append tar "/bin/tar") "xvf" "data.tar")
> (install-file (string-append "usb-modeswitch-data-"
> (package-version this-package)
^
You’re missing a comma (“unquote”) so that ‘package-version’ is called
on the host side; it doesn’t exist on the build side.
> "/usb_modeswitch.d") share-dir))
> #t)))
#t is unnecessary here.
> From 3430070606904b6dc6b247a6b8bfb2ce7c4fce0f Mon Sep 17 00:00:00 2001
> From: Florian Pelz <pelzflorian@pelzflorian.de>
> Date: Tue, 14 May 2019 12:36:24 +0200
> Subject: [PATCH] Add USB_ModeSwitch.
>
> * gnu/packages/usb-modeswitch.scm (usb-modeswitch-data) Add it.
> (usb-modeswitch) Add it.
Just “New file”. Make sure to add the file to gnu/local.mk please.
> +(define-module (gnu packages libusb)
Please adjust the module name: it should be ‘usb-modeswitch’.
> + (synopsis "Data package for USB_ModeSwitch")
> + (description "Device data collection and UDEV rules file for
> +USB_ModeSwitch.")
Please make it a full sentence, and ideally expound a bit (info "(guix)
Synopses and Descriptions").
> +;; (use-modules (guix build utils))
Make sure to remove any leftovers like this comment before sending the
next version. :-)
> + (replace 'install
> + (lambda _ ; calling make would use usr as PREFIX
> + (let* ((source (assoc-ref %build-inputs "source"))
> + (out (assoc-ref %outputs "out"))
> + (bin (string-append out "/bin"))
Please don’t refer to global variables ‘%outputs’ and ‘%build-inputs’.
Instead, take them from the phase’s arguments:
(lambda* (#:key source outputs inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
…))
> + (install-file "usb_modeswitch_dispatcher"
> + dispatcher-bin))))))))
The phase must return #t.
> + (synopsis "Mode switching tool for controlling 'multi-mode' USB devices")
Probably `multi-mode', as expected in Texinfo.
> + (description "USB_ModeSwitch is a mode switching tool for controlling USB
> +devices with multiple \"modes\". When plugged in for the first time many USB
… and @dfn{modes}
Could you send an updated patch?
Is USB_ModeSwitch needed for proper use of ModemManager? I’d say “no”
but I’m unsure.
Thanks for working on it!
Ludo’.
next prev parent reply other threads:[~2019-05-15 13:02 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 18:26 bug#35640: Make USB modems just work on Guix pelzflorian (Florian Pelz)
2019-05-09 5:31 ` pelzflorian (Florian Pelz)
2019-05-09 12:55 ` Danny Milosavljevic
2019-05-09 13:07 ` pelzflorian (Florian Pelz)
2019-05-09 13:43 ` pelzflorian (Florian Pelz)
2019-05-09 15:24 ` Ludovic Courtès
2019-05-13 20:57 ` pelzflorian (Florian Pelz)
2019-05-13 21:04 ` pelzflorian (Florian Pelz)
2019-05-14 7:22 ` pelzflorian (Florian Pelz)
2019-05-14 8:35 ` Danny Milosavljevic
2019-05-14 20:56 ` pelzflorian (Florian Pelz)
2019-05-15 13:01 ` Ludovic Courtès [this message]
2019-05-15 14:40 ` pelzflorian (Florian Pelz)
2019-05-22 16:29 ` pelzflorian (Florian Pelz)
2019-05-22 17:58 ` pelzflorian (Florian Pelz)
2019-05-24 15:37 ` Ludovic Courtès
2019-05-24 20:12 ` pelzflorian (Florian Pelz)
2019-05-25 11:18 ` pelzflorian (Florian Pelz)
2019-05-25 12:43 ` pelzflorian (Florian Pelz)
2019-05-25 17:44 ` Ludovic Courtès
2019-05-25 19:42 ` pelzflorian (Florian Pelz)
2019-06-12 10:36 ` pelzflorian (Florian Pelz)
2019-06-12 10:41 ` pelzflorian (Florian Pelz)
2019-06-12 21:00 ` Ludovic Courtès
2019-06-12 21:11 ` Ludovic Courtès
2019-06-13 18:04 ` pelzflorian (Florian Pelz)
2019-06-13 18:05 ` pelzflorian (Florian Pelz)
2019-06-15 16:39 ` Ludovic Courtès
2019-06-12 12:13 ` pelzflorian (Florian Pelz)
2019-06-12 12:21 ` Ludovic Courtès
2019-06-12 19:51 ` pelzflorian (Florian Pelz)
2019-06-12 20:42 ` Ludovic Courtès
2019-06-12 20:58 ` Ludovic Courtès
2019-05-14 20:48 ` Ludovic Courtès
2019-05-15 11:17 ` pelzflorian (Florian Pelz)
2019-05-15 12:51 ` Ludovic Courtès
2019-05-16 7:50 ` pelzflorian (Florian Pelz)
2019-05-16 8:34 ` pelzflorian (Florian Pelz)
2019-05-16 11:30 ` Ludovic Courtès
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=87ef4zvpm7.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=35640@debbugs.gnu.org \
--cc=pelzflorian@pelzflorian.de \
/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).