From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH v6 01/10] gnu: cross: Use CROSS_*_INCLUDE_PATH for system headers.
Date: Fri, 29 Apr 2016 14:54:31 +0200 [thread overview]
Message-ID: <877ffg1soo.fsf@drakenvlieg.flower> (raw)
In-Reply-To: <877ffgpxii.fsf@igalia.com> (Andy Wingo's message of "Fri, 29 Apr 2016 11:36:21 +0200")
Andy Wingo writes:
>>>> + ,(if (mingw-target?)
>>>> + "cmd.exe"
>>>> + `(if bash
>>>> + (string-append bash "/bin/bash")
>>>> + "bash"))))))
>>>> %standard-phases)))
>
> Note that this patch has an extra level of quoting for the not-mingw
> case.
Oops, changed it to (see below)
(let ((bash (assoc-ref inputs "bash")))
(substitute* "module/ice-9/popen.scm"
(("/bin/sh")
(if bash
(string-append bash "/bin/bash")
"bash")))))
%standard-phases)))
>> I can imagine that if I somehow installed a version of bash.exe
>> (msys/cygwin) in PATH, I would expect open-pipe to use that rather than
>> cmd.
>>
>> I'm not sure if you have a suggestion for change here, or if we should
>> get more input first?
>
> 3 options:
>
> 1. Run cmd.exe from path. Disadvantage: incompatible interface.
>
> 2. Build bash in mingw for Guix; no special cases. The Right Thing.
> However I'm OK with accepting a patch that doesn't do this, in the
> interests of moving things forward.
>
> 3. Run bash from path. Disadvantage: bash probably not in the path and
> the invocation would fail. Arguably an early failure is the right
> thing, though!
>
> I think I'd go with (3) rather than (1). WDYT? From a Guile
> perspective you can always use `open-pipe*' which doesn't trampoline
> through a shell at all.
Thank you, that's a helpful observation. Seeing this, yes 3) would be
my choice too.
Thinking about it 2) The Right Thing I had another puzzle-area: why is
it that we have /bin/sh and not /bin/guile in GuixSD; and wouldn't we
want the shell to be schemy-er or, how hard would it be for guile to
parse shell?
Anyway, while testing 3) I realised that whatever we put here is moot, at
least for now, seeing that...
#ifdef HAVE_FORK
static void
scm_init_popen (void)
{
scm_c_define_gsubr ("open-process", 2, 0, 1, scm_open_process);
}
#endif
Sorry for being so dull...there isn't a any of such goodness [yet] in
Windows/MinGW.
>> Below is a first attempt that I didn't want to send as a proper patch
>> yet. I could do with some input, especially from Manolis.
>
> It's really helpful to me, thank you!
Okay, thanks. I'll work on this a bit and present a patch later.
I'm building and will have a v7 patch set rsn.
Greetings,
Jan
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
prev parent reply other threads:[~2016-04-29 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 19:27 [PATCH v6 01/10] gnu: cross: Use CROSS_*_INCLUDE_PATH for system headers Jan Nieuwenhuizen
2016-04-28 8:18 ` Andy Wingo
2016-04-28 20:16 ` Jan Nieuwenhuizen
2016-04-28 20:41 ` Jan Nieuwenhuizen
2016-04-29 9:36 ` Andy Wingo
2016-04-29 12:54 ` Jan Nieuwenhuizen [this message]
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=877ffg1soo.fsf@drakenvlieg.flower \
--to=janneke@gnu.org \
--cc=guix-devel@gnu.org \
--cc=wingo@igalia.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 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.