On Mon, Aug 28, 2017 at 10:32:41PM +0200, Ricardo Wurmus wrote: > > Ricardo Wurmus <rek...@elephly.net> writes: > > > You could also access the arguments of another package with > > “package-arguments”. Using the “properties” field isn’t pretty because > > it is a free form alist. > > > > You can use “find-tail” to jump to the keyword in “arguments” and then > > pick the following value. > > Here an example: > > --8<---------------cut here---------------start------------->8--- > (define (assoc-args-ref pkg key) > "Return the value associated with KEY in the arguments of package PKG, > or #F if there is no such key." > (let ((ref (find-tail (cut eq? <> key) > (package-arguments pkg)))) > (and=> ref second))) > > (assoc-args-ref golang-github-com-audriusbutkevicius-go-nat-pmp > #:import-path) > > => "github.com/AudriusButkevicius/go-nat-pmp" > --8<---------------cut here---------------end--------------->8---
I didn't get very far in this direction before deciding to try another technique. But wouldn't this not work on the build side, since (guix packages) is not available there? I considered building an alist of store items and "import paths" and passing that into the build from the host side, but it started to feel like the wrong approach. Instead my latest approach [0] is to "record" the packages' import paths via their store items' filesystem layouts. [0] https://lists.gnu.org/archive/html/guix-devel/2017-08/msg00323.html
signature.asc
Description: PGP signature