On Thu, Jul 28, 2016 at 11:38:30PM +0200, Danny Milosavljevic wrote: > > gnu: Add perl-crypt-openssl-bignum. > > * gnu/packages/tls.scm (perl-crypt-openssl-bignum, > perl-crypt-openssl-arguments): New variables. > --- > gnu/packages/tls.scm | 36 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) >
> diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm > index d992c51..fba130b 100644 > --- a/gnu/packages/tls.scm > +++ b/gnu/packages/tls.scm > @@ -556,3 +556,39 @@ servers or clients for more complicated applications.") > "RSA encoding and decoding, using the openSSL libraries") > (description "Crypt::OpenSSL::RSA does RSA encoding and decoding (using > the OpenSSL libraries).") > (license (package-license perl)))) > + > +(define perl-crypt-arguments > + `(#:phases (modify-phases %standard-phases > + (add-before 'configure 'patch-Makefile.PL > + (lambda* (#:key inputs #:allow-other-keys) > + (substitute* "Makefile.PL" > + (("'LIBS'.*=>.*") (string-append "'LIBS' => ['-L" > + (assoc-ref inputs "openssl") > + "/lib -lcrypto'],"))) > + #t))))) I see this variable is also used in perl-crypt-openssl-random. I don't have a very strong sense of Scheme style yet, but so far I've seen things like this duplicated between package definitions. I think it's better to reduce the proliferation of non-package variables in gnu/packages... what do you think? I can amend the patches if you agree.