From 44ae580e4affc03bcfd6d27277ea78aa63021fb9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 19 Apr 2018 17:17:54 +0200 Subject: [PATCH] gnu: perl: Fix grafting error due to version number in Perl library path. Fixes . * gnu/packages/perl.scm (perl-5.26.2): Use (package (inherit) ...) instead of (package/inherit ...). [arguments]: Add phase 'workaround-grafting-version-bug'. --- gnu/packages/perl.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index aaf3e2e82..4cd5bf6df 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -44,6 +44,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix utils) ;substitute-keyword-arguments for perl-5.26.2 #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages freedesktop) @@ -161,7 +162,8 @@ ;; Fixes CVE-2018-6797, CVE-2018-6798, and CVE-2018-6913. ;; See . (define-public perl-5.26.2 - (package/inherit perl + (package + (inherit perl) (version "5.26.2") (source (origin (inherit (package-source perl)) @@ -169,7 +171,19 @@ version ".tar.gz")) (sha256 (base32 - "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp")))))) + "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp")))) + (arguments + (substitute-keyword-arguments (package-arguments perl) + ((#:phases phases) + `(modify-phases ,phases + ;; The path to libperl.so includes the Perl version number, and this + ;; is not handled by grafting. See . + (add-after 'install 'workaround-grafting-version-bug + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (with-directory-excursion (string-append out "/lib/perl5") + (symlink "5.26.2" "5.26.1") + #t)))))))))) (define-public perl-algorithm-c3 (package -- 2.17.0