[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add (minimal) BioPerl.
From: |
Ricardo Wurmus |
Subject: |
Re: [PATCH] Add (minimal) BioPerl. |
Date: |
Mon, 24 Aug 2015 15:03:01 +0200 |
Hi,
Ricardo Wurmus <address@hidden> writes:
> Ludovic Courtès <address@hidden> writes:
>
>>> Is there a better way to make sure that all (direct and transient)
>>> runtime dependencies can be found through the PERL5LIB variable?
>>
>> Good question. The #:inputs parameter of build phases contains all the
>> inputs (native, normal, and propagated) when not cross-compiling, so
>> that doesn’t help.
>>
>> Currently you would have to enumerate the subset of the inputs that you
>> want to use in ‘wrap-program’ as done in the ‘clusterssh’ recipe, for
>> instance. That’s tedious but still preferable, esp. if that reduces the
>> size of the package’s closure.
>>
>>> From a7f69eb16e91ca94e5894b234a98a7f14e78fd64 Mon Sep 17 00:00:00 2001
>>> From: Ricardo Wurmus <address@hidden>
>>> Date: Wed, 3 Jun 2015 17:44:20 +0200
>>> Subject: [PATCH] gnu: Add BioPerl.
>>>
>>> * gnu/packages/bioinformatics.scm (bioperl-minimal): New variable.
>>
>> [...]
>>
>>> + ;; Make sure all executables in "bin" find the required Perl
>>> + ;; modules at runtime.
>>> + (let* ((out (assoc-ref outputs "out"))
>>> + (bin (string-append out "/bin/"))
>>> + (path (string-append out "/lib/perl5/site_perl:"
>>> + (getenv "PERL5LIB"))))
>>> + (for-each (lambda (file)
>>> + (wrap-program file
>>> + `("PERL5LIB" ":" prefix (,path))))
>>> + (find-files bin "\\.pl$"))
>>
>> So either leave a “FIXME” saying that this is closing over a superset of
>> what’s actually needed at run time, or enumerate the inputs.
>>
>> Otherwise LGTM.
>
> Attached is a new patch in which only the paths of the transitive target
> inputs (+ the output perl site_perl directory) are wrapped around the
> executables. The resulting path is a lot shorter than the PERL5LIB path
> at build time and judging from my quick tests the executables do not
> complain about missing Perl modules.
>
> WDYT?
I think that this patch is better than the previous versions in which
all programmes were wrapped in whatever “PERL5LIB” contained at
build-time. If there are no objections, I’ll push the last commit to
add ‘bioperl-minimal’.
~~ Ricardo
- Re: [PATCH] Add (minimal) BioPerl.,
Ricardo Wurmus <=