Ludovic Courtès <l...@gnu.org> writes: > David Thompson <dthomps...@worcester.edu> skribis: > >> Found one big issue with adding a $PATH search path specification to a >> package: It messes up the 'set-paths' phase of 'gnu-build-system'. >> $PATH ends up being unset! >> >> environment variable `PATH' set to >> `/gnu/store/dwjlh4id7ksdjiigfddw5dq617bajxxm-ruby-2.2.0/bin:/gnu/store/cdgpj8djhvfwsysa0bklx7l17bkjgnr6-git-2.2.1/bin:/gnu/store/paknwghpb3530zpw6kjzygcwyi4v2b7a-tar-1.28/bin:/gnu/store/gzfwcp3rx6vx9yhfn258pqravsihkhgk-gzip-1.6/bin:/gnu/store/v47nyd4lmk6079lahhn7qjg1x30sq6r0-bzip2-1.0.6/bin:/gnu/store/45cspsg2pi0d9n1x62r85iaf6118scnr-xz-5.0.4/bin:/gnu/store/b1hflfspi7d8y8d6xxsm1hpmh1s6aki9-file-5.22/bin:/gnu/store/5x6ypvynrc4y3dnynqj948c6xdhpagv8-diffutils-3.3/bin:/gnu/store/q1fk0vrzdz7vzawq32k2slpgxhrlq0b3-patch-2.7.1/bin:/gnu/store/b1msmz538khma08mg8dm6lw0vkjilbjd-sed-4.2.2/bin:/gnu/store/izbkwxcgikxlinj78lh1934f39n98mn2-findutils-4.4.2/bin:/gnu/store/jyib7byzyincn3q7mkkrm9q5wfbg105z-gawk-4.1.1/bin:/gnu/store/s7jlv9f6v23h17bnkbvcvqk1qnhg40pb-grep-2.21/bin:/gnu/store/vgjlzkg84jpzvz227ac5aygqx25bb6wh-coreutils-8.23/bin:/gnu/store/dvlp6nk7avz403585k9xndl6zqy6vwmj-make-4.1/bin:/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin:/gnu/store/4x401cpj6nmddji54l99cl89ggn5pgib-ld-wrapper-0/bin:/gnu/store/h7lqkyf4sc37lkbmnph9kmmsfqr3xk5n-binutils-2.25/bin:/gnu/store/16j0v2km34g471cs77gxlq0n0a956cw1-gcc-4.8.4/bin:/gnu/store/q2mm1wv4a3g0b29yv0rjybfjh8kr07qi-glibc-2.20/bin:/gnu/store/q2mm1wv4a3g0b29yv0rjybfjh8kr07qi-glibc-2.20/sbin' >> environment variable `PATH' unset >> >> I think this can be remedied with a bit more work. > > I think that’s because build systems are still passed a non-merged > list, no?
Yes, I think so. I think I have resolved this, but it's a "rebuild the world" change so I don't yet know if it works. Would it be possible to add a 'wip-search-paths' branch for Hydra to build? I'm giving it a shot on my laptop, but if my code fails I won't be very motivated to toture my computer with another full rebuild. Also, since I posted the original patch set, I have refactored the code a bit, resulting in this new procedure in (gnu packages): (define* (packages->search-path-specifications packages #:key (native? #t)) "Deduplicate and merge search path specifications in PACKAGES, a list of package objects. When NATIVE? is '#t', return native search path specifications, or standard search path specifications otherwise." (merge-search-path-specifications (append %base-search-path-specifications (delete-duplicates (append-map (if native? package-native-search-paths package-search-paths) packages))))) It factorizes the pattern used in the 'guix package' and 'guix environment' commands, as well as the 'bag->derivation' and 'bag->cross-derivation' procedures. -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate