all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#41796: Grafts don't handle outputs other than out
@ 2020-06-10 22:32 Jakub Kądziołka
  2020-06-11 16:46 ` Ludovic Courtès
  2020-06-11 17:12 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kądziołka @ 2020-06-10 22:32 UTC (permalink / raw)
  To: 41796

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-11 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 22:32 bug#41796: Grafts don't handle outputs other than out Jakub Kądziołka
2020-06-11 16:46 ` Ludovic Courtès
2020-06-11 17:12 ` Ludovic Courtès

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.