unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: guix-devel@gnu.org, 52284@debbugs.gnu.org
Subject: bug#52284: Partially unifying packages and inferior packages
Date: Mon, 06 Dec 2021 14:14:33 +0100	[thread overview]
Message-ID: <87bl1tnadi.fsf@gnu.org> (raw)
In-Reply-To: <b1d6da8fe3d3afd8f04968a146cc47732eb0fa85.camel@telenet.be> (Maxime Devos's message of "Sat, 04 Dec 2021 21:01:42 +0000")

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> (define (inferior-package->package inf)
>   ;; TODO: somehow make sure no inheritance happens on this package
>   (package
>     (name (inferior-package-name inf))
>     (version (inferior-package-version inf))
>     (replacement (and=> (inferior-package-replacement inf) inferior-package->package))
>     (source #f) ; TODO
>     (build-system inferior-package-build-system)
>     (arguments `(#:inferior-package ,inf))
>     (synopsis (inferior-package-synopsis inf))
>     (description (inferior-package-description inf))
>     (home-page (inferior-package-home-page inf))
>     (location (inferior-package-location inf))
>     (inputs (map inferior-inputs->inputs (inferior-package-inputs inf)))
>     (native-inputs (map inferior-inputs->inputs (inferior-package-native-inputs inf)))
>     (propagated-inputs (map inferior-inputs->inputs (inferior-package-propagated-inputs inf)))
>     (transitive-propagated-inputs (map inferior-inputs->inputs (inferior-package-transitive-propagated-inputs inf)))    
>     (native-search-paths (propagated-package-native-search-paths inf))
>     (search-paths (propagated-package-search-paths inf))
>     (license #f)) ; TODO

That’s a clever hack!

Longer-term, I think it would be nice(r) to use a type hierarchy somehow
so <inferior-package> instances can truly be used anywhere a <package>
is expected.

Thanks,
Ludo’.




      reply	other threads:[~2021-12-06 13:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 21:01 bug#52284: Partially unifying packages and inferior packages Maxime Devos
2021-12-06 13:14 ` Ludovic Courtès [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

  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=87bl1tnadi.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=52284@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=maximedevos@telenet.be \
    /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).