unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] nix: Don't propagate Perl libraries.
@ 2015-11-12 10:08 宋文武
  2015-11-12 13:00 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: 宋文武 @ 2015-11-12 10:08 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0002-gnu-nix-Don-t-propagate-Perl-libraries.patch --]
[-- Type: text/x-diff; name=0002-gnu-nix-Don-t-propagate-Perl-libraries.patch, Size: 2359 bytes --]

From 4f1ce6ac61e48a8752cd4c095be2ad34c2f210b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Thu, 12 Nov 2015 17:59:34 +0800
Subject: [PATCH 2/2] gnu: nix: Don't propagate Perl libraries.

* gnu/packages/package-management.scm (nix): Move perl-www-curl,
  perl-dbi and perl-dbd-sqlite from 'propagated-inputs' to 'inputs'.
  [arguments]: Add #:configure-flags.
---
 gnu/packages/package-management.scm | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 244cd49..1c15196 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -251,16 +251,29 @@ the Nix package manager.")
     ;; XXX: Should we pass '--with-store-dir=/gnu/store'?  But then we'd also
     ;; need '--localstatedir=/var'.  But then!  The thing would use /var/nix
     ;; instead of /var/guix.  So in the end, we do nothing special.
+    (arguments
+     '(#:configure-flags
+       ;; Set the prefixes of Perl libraries to avoid propagation.
+       (let ((perl-libdir (lambda (p)
+                            (string-append
+                             (assoc-ref %build-inputs p)
+                             "/lib/perl5/site_perl"))))
+         (list (string-append "--with-dbi="
+                              (perl-libdir "perl-dbi"))
+               (string-append "--with-dbd-sqlite="
+                              (perl-libdir "perl-dbd-sqlite"))
+               (string-append "--with-www-curl="
+                              (perl-libdir "perl-www-curl"))))))
     (native-inputs `(("perl" ,perl)
                      ("pkg-config" ,pkg-config)))
     (inputs `(("curl" ,curl)
               ("openssl" ,openssl)
               ("libgc" ,libgc)
               ("sqlite" ,sqlite)
-              ("bzip2" ,bzip2)))
-    (propagated-inputs `(("perl-www-curl" ,perl-www-curl)
-                         ("perl-dbi" ,perl-dbi)
-                         ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
+              ("bzip2" ,bzip2)
+              ("perl-www-curl" ,perl-www-curl)
+              ("perl-dbi" ,perl-dbi)
+              ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
     (home-page "http://nixos.org/nix/")
     (synopsis "The Nix package manager")
     (description
-- 
2.6.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-nix-Update-to-1.10.patch --]
[-- Type: text/x-diff; name=0001-gnu-nix-Update-to-1.10.patch, Size: 1322 bytes --]

From 09518038844895e5d66436e7bc039067c1fb9932 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Thu, 12 Nov 2015 17:43:58 +0800
Subject: [PATCH 1/2] gnu: nix: Update to 1.10.

* gnu/packages/package-management.scm (nix): Update to 1.10.
---
 gnu/packages/package-management.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index b6385a2..244cd49 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -239,14 +239,14 @@ the Nix package manager.")
 (define-public nix
   (package
     (name "nix")
-    (version "1.8")
+    (version "1.10")
     (source (origin
              (method url-fetch)
              (uri (string-append "http://nixos.org/releases/nix/nix-"
                                  version "/nix-" version ".tar.xz"))
              (sha256
               (base32
-               "077hircacgi9y4n6kf48qp4laz1h3ab6sif3rcci1jy13f05w2m3"))))
+               "1xhh7l1dqwn6i3m51xp8l0aa95da3823w4h8n8hfxlcxaixcl4jn"))))
     (build-system gnu-build-system)
     ;; XXX: Should we pass '--with-store-dir=/gnu/store'?  But then we'd also
     ;; need '--localstatedir=/var'.  But then!  The thing would use /var/nix
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nix: Don't propagate Perl libraries.
  2015-11-12 10:08 [PATCH] nix: Don't propagate Perl libraries 宋文武
@ 2015-11-12 13:00 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-11-12 13:00 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

宋文武 <iyzsong@openmailbox.org> skribis:

> From 4f1ce6ac61e48a8752cd4c095be2ad34c2f210b9 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
> Date: Thu, 12 Nov 2015 17:59:34 +0800
> Subject: [PATCH 2/2] gnu: nix: Don't propagate Perl libraries.
>
> * gnu/packages/package-management.scm (nix): Move perl-www-curl,
>   perl-dbi and perl-dbd-sqlite from 'propagated-inputs' to 'inputs'.
>   [arguments]: Add #:configure-flags.

Good idea.  LGTM.

> From 09518038844895e5d66436e7bc039067c1fb9932 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
> Date: Thu, 12 Nov 2015 17:43:58 +0800
> Subject: [PATCH 1/2] gnu: nix: Update to 1.10.
>
> * gnu/packages/package-management.scm (nix): Update to 1.10.

OK.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-12 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-12 10:08 [PATCH] nix: Don't propagate Perl libraries 宋文武
2015-11-12 13:00 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).