unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 41796@debbugs.gnu.org
Subject: bug#41796: Grafts don't handle outputs other than out
Date: Thu, 11 Jun 2020 00:32:20 +0200	[thread overview]
Message-ID: <20200610223220.hi36uznx57jol2h5@gravity> (raw)

[-- Attachment #1: Type: text/plain, Size: 1762 bytes --]

$ cat test.scm
(use-modules
  (guix packages)
  (guix build-system trivial))

(define-public core-pkg
  (package
    (name "core-pkg")
    (version "1.0")
    (replacement core-pkg/fixed)
    (source #f)
    (outputs '("out" "lib"))
    (build-system trivial-build-system)
    (arguments
     `(#:modules ((guix build utils))
       #:builder
       (begin
         (use-modules (guix build utils))
         (let ((outdir (assoc-ref %outputs "out"))
               (libdir (assoc-ref %outputs "lib")))
           (mkdir-p outdir)
           (mkdir-p libdir)
           #t))))
    (synopsis #f)
    (description #f)
    (home-page #f)
    (license #f)))

(define-public core-pkg/fixed
  (package
    (inherit core-pkg)
    (version "1.1")))

(package
  (name "other-pkg")
  (version "4.2")
  (source #f)
  (build-system trivial-build-system)
  (inputs
  `(("core-pkg" ,core-pkg)
    ("core-pkg:lib" ,core-pkg "lib")))
  (arguments
  `(#:modules ((guix build utils))
    #:builder
    (begin
      (use-modules (guix build utils))
      (let ((outdir (assoc-ref %outputs "out")))
        (mkdir-p outdir)
        (with-output-to-file (string-append outdir "/hello")
          (lambda ()
            (display (assoc-ref %build-inputs "core-pkg"))
            (newline)
            (display (assoc-ref %build-inputs "core-pkg:lib"))
            (newline)))
        #t))))
  (synopsis #f)
  (description #f)
  (home-page #f)
  (license #f))
~$ cat `guix build --no-offload -f test.scm`/hello
/gnu/store/pmz07rzm63z02lkyyldsw3srf98h01y2-core-pkg-1.1
/gnu/store/pivsji8qfpln4i4v0f5v5cjmzakmcmvg-core-pkg-1.0-lib

Expected output: the second line contains -core-pkg-1.1-lib.

Regards,
Jakub Kądziołka

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2020-06-10 22:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 22:32 Jakub Kądziołka [this message]
2020-06-11 16:46 ` bug#41796: Grafts don't handle outputs other than out Ludovic Courtès
2020-06-11 17:12 ` 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=20200610223220.hi36uznx57jol2h5@gravity \
    --to=kuba@kadziolka.net \
    --cc=41796@debbugs.gnu.org \
    /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).