guix-devel
[Top][All Lists]
Advanced

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

Re: Package Definition Place


From: Ludovic Courtès
Subject: Re: Package Definition Place
Date: Sat, 04 Jan 2014 12:47:06 +0100
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Kete <address@hidden> skribis:

> Thanks, that did help, but I got the following error:
>       checking if tcsetpgrp() actually works... notty
>       configure: error: no controlling tty
>       Try running configure with --with-tcsetpgrp or --without-tcsetpgrp

Ah, that’s an issue with the ‘configure’ script of Zsh now.

I’d recommend looking at how that tcsetpgrp check is implemented, to see
what makes it think it doesn’t work.  In particular what does
‘config.log’ report about this test?

This may be due to the chroot build environment, which could be lacking
something Zsh expects (see
<http://www.gnu.org/software/guix/manual/guix.html#Setting-Up-the-Daemon>
for details.)

> I tried the first flag, but it "failed to match any pattern in form". I was 
> copying the bash.scm, but I'm not sure if Zsh needs the readline and texinfo 
> stuff. Maybe I should just attach my package definition as Nikita requested. 
> It's attached.

Note that bash.scm is relatively complex, because Bash has a limited
‘configure’ interface; hopefully you can do something simpler here.

> By the way, the license also says some of the scripts are licensed with the 
> GPL.

The ‘license’ field should reflect the license of what gets installed.
So if build-time scripts are GPL, that doesn’t matter here.  But please
do skim over the license headers to make sure they’re all under that
X11-style license.

> (define-public zsh
>   (let* ((configure-flags
>         ``("--with-tcsetpgrp"))))

‘let*’ introduces a ‘configure-flags’ local variable, but it’s not used
after that.  So you can remove that ‘let*’ form altogether, and instead...

>   (package
>    (name "zsh")
>    (version "5.0.2")
>    (source (origin
>           (method url-fetch)
>           (uri (string-append "ftp://ftp.zsh.org/zsh/zsh.tar.bz2";))
>           (sha256
>            (base32 "1s2fvv0zfpi0qg9fzhiv8ac19pwbbjd0sbsbzmll3nqa8k4yfvz9"))))
>    (build-system gnu-build-system)

... you can add an ‘arguments’ field (info "(guix) Defining Packages"):

  (arguments '(#:configure-flags '("--with-tcsetpgrp")))

In the build log, search for ‘configure flags’, and you’ll notice that
--with-tcsetpgrp is now passed (and I guess this should solve the
problem above?)

>    (inputs `(("readline" ,readline)
>            ("ncurses" ,ncurses)
>            ("texinfo" ,texinfo)))

My guess is that Zsh doesn’t use Readline nor Texinfo, but please check
its documentation to see what’s needed.

>    (synopsis "Z Shell")
>    (description "Zsh is a UNIX command interpreter (shell) usable as an 
> interactive login shell and as a shell script command processor. Of the 
> standard shells, zsh most closely resembles ksh but includes many 
> enhancements. Zsh has command line editing, builtin spelling correction, 
> programmable command completion, shell functions (with autoloading), a 
> history mechanism, and a host of other features.")

Please wrap lines below 80 characters, and don’t use tabs (see “Coding
Style” in the ‘HACKING’ file.)

Hope this helps!

Ludo’.



reply via email to

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