unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Taylan Ulrich \"Bayırlı/Kammer\"" <taylanbayirli@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add Nmap.
Date: Mon, 24 Nov 2014 15:22:26 +0100	[thread overview]
Message-ID: <87r3ws1xwd.fsf@gnu.org> (raw)
In-Reply-To: <87k32l8oid.fsf@taylan.uni.cx> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Mon, 24 Nov 2014 00:51:06 +0100")

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> This is normally dealt with by using multiple outputs (info "(guix)
>> Packages with Multiple Outputs").  An example of that is Git: the Tcl
>> GUIs are moved to a separate output, and so is git-svn support, such
>> that the main output does not depend on Tcl, libx11, Subversion, etc.
>
> OK, will have a go at this.

Thanks, that seems like the best option.

> It seems Zenmap doesn't need X11/GTK libraries (rather headers) at build
> time because it only uses a Python GTK module.  This raises two general
> questions for me:
>
> 1) Is it OK if users have to install additional packages for a given
>    component of a package to work, or should all dependencies, even if
>    purely run-time, be inputs?

Yes.  (There may be rare exceptions, but this is not one of them.)

Here you want users to be able to run ‘zenmap’ (or whatever the command
is called) and have it Just Work, regardless of whether they happen to
have installed Python and Python-GTK as well.

So that means that the zenmap (or nmap) package basically needs to
“close over” these inputs, probably using ‘wrap-program’.

> 2) If purely-run-time dependencies are inputs, won't that trigger
>    unnecessary rebuilds of the package when a run-time dependency is
>    updated?

It’s rarely be “purely run-time”.  Normally, at the very least there’s a
configure script that makes sure at build-time that the dependencies are
satisfied, and a test suite that makes sure things work.

> After some pondering, I would say:
>
> 1) There should be a way to run-time-depend on another package without
>    it being a build input at all.

The whole functional approach things means that bindings are static
(again, there may be exceptions, but zenmap has nothing exceptional
here.)

> 2) When interface files of a dylib are needed during compilation of a
>    static lang (e.g. C headers), a special for-building package should
>    be used as input, thus the actual dylib can be updated without
>    causing rebuilds.  (Until ABI compatibility breaks I guess.)

You’re describing an imperative packaging system.  This is fine, but it
defeats the whole idea of functional packaging.  :-)

See <http://nixos.org/docs/papers.html> and
<http://gnu.org/s/guix/#documentation> for the rationale.

> 3) Similarly, when a program is needed purely at build-time, like Bash
>    or SCons, a special for-building package should be used as input,
>    thus the actual program can be updated without causing rebuilds.
>    (The for-building package would be updated only when doing so will
>    improve the builds, like when a newer GCC version optimizes better.)

Build tools are listed in ‘native-inputs’.

> "Runtime dependencies are found by scanning binaries for the hash parts
> of Nix store paths (such as r8vvq9kq…). This sounds risky, but it works
> extremely well."
>
> Perhaps we already do that?

Yes.  That means that run-time dependencies are a strict subset of
build-time dependencies.

I hope this clarifies things.  Otherwise let me know!

Thanks,
Ludo’.

  reply	other threads:[~2014-11-24 14:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-22 22:05 [PATCH] gnu: Add Nmap "Taylan Ulrich Bayırlı/Kammer"
2014-11-23  9:02 ` Andreas Enge
2014-11-23 11:54   ` Taylan Ulrich Bayırlı/Kammer
2014-11-23 20:38     ` Ludovic Courtès
2014-11-23 23:51       ` Taylan Ulrich Bayırlı/Kammer
2014-11-24 14:22         ` Ludovic Courtès [this message]
2014-11-24 20:52           ` Taylan Ulrich Bayırlı/Kammer
2014-11-25 21:09             ` Ludovic Courtès
2014-11-25 23:25               ` Taylan Ulrich Bayırlı/Kammer
2014-11-26  2:01                 ` Eric Bavier

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=87r3ws1xwd.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=taylanbayirli@gmail.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).