unofficial mirror of 
 help / color / mirror / Atom feed
* bug#48082: “guix environment -l” does not work with inferior packages
@ 2021-04-28 16:19 Ricardo Wurmus
  0 siblings, 0 replies; only message in thread
From: Ricardo Wurmus @ 2021-04-28 16:19 UTC (permalink / raw)
  To: 48082

I wanted to use an environment file that contains a package 
definition, and use it with inferiors.  Here is the full guix.scm:

--8<---------------cut here---------------start------------->8---
 (guix channels)
 (guix inferior)
 (guix build-system gnu)
 (guix packages)
 (guix licenses)
 (gnu packages)
 (ice-9 match))

(define channels
  (list (channel
         (name 'guix-bimsb)
         (url "")
         (name 'guix)
         (url "")
            "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 

(define (lookup name)
  (specification->package name))

(define (lookup-inferior name)
  (define inferior
    (inferior-for-channels channels))
  (match (lookup-inferior-packages inferior name)
    ((first . rest) first)
    (_ (error
        (format #false "Could not find package `~a'.~%" name)))))

(define (p name)
  (let* ((how (if (getenv "USE_GUIX_INFERIOR")
                  lookup-inferior lookup))
         (pkg (how name)))
    `(,name ,pkg)))

(define %version
  (symbol->string (with-input-from-file "VERSION" read)))

(define-public my-package
    (name "my-package")
    (version %version)
     (string-append (getcwd) "/my-package-" version ".tar.gz"))
    (build-system gnu-build-system)
     (map p (list "bwa"
     (map p (list "autoconf"
    (home-page "TODO")
    (synopsis "TODO")
    (description "TODO")
    (license gpl3+)))

--8<---------------cut here---------------end--------------->8---

The idea was that you would use the provided channels with

    USE_GUIX_INFERIOR=t guix environment -l guix.scm

Unfortunately, this does not work, but there also is no error.  I 
end up in an environment where none of the declared inputs are 
available.  That’s because (guix scripts environments) has no 
facilities to deal with packages that are of type 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-28 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 16:19 bug#48082: “guix environment -l” does not work with inferior packages Ricardo Wurmus

unofficial mirror of 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror guix-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-bugs guix-bugs/ \
	public-inbox-index guix-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git