From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH 2/2] packages: Add %base-search-path-specifications. Date: Mon, 23 Feb 2015 21:19:56 -0500 Message-ID: <87bnkk9hkj.fsf@fsf.org> References: <87ioes9hyi.fsf@fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQ56N-00069f-Ms for guix-devel@gnu.org; Mon, 23 Feb 2015 21:20:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQ56M-0007qo-IB for guix-devel@gnu.org; Mon, 23 Feb 2015 21:19:59 -0500 Received: from mail.fsf.org ([208.118.235.13]:55577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQ56M-0007qk-EV for guix-devel@gnu.org; Mon, 23 Feb 2015 21:19:58 -0500 Received: from 209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.40.86]:39909 helo=izanagi) by mail.fsf.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1YQ56L-00053Y-CN for guix-devel@gnu.org; Mon, 23 Feb 2015 21:19:58 -0500 In-Reply-To: <87ioes9hyi.fsf@fsf.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-packages-Add-base-search-path-specifications.patch >From cdc378a6fb6a59e49511d4151e0f2ba79e502632 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 23 Feb 2015 20:45:59 -0500 Subject: [PATCH 2/2] packages: Add %base-search-path-specifications. * guix/packages.scm (%base-search-path-specifications): New variable. * guix/scripts/package.scm (search-path-environment-variables): Append base search paths to package search paths. * guix/scripts/environment.scm (for-each-search-path): Factor out hardcoded search path. --- guix/packages.scm | 6 ++++++ guix/scripts/environment.scm | 8 +++----- guix/scripts/package.scm | 7 ++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 3e0574a..0804247 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -53,6 +53,7 @@ search-path-specification search-path-specification? + %base-search-path-specifications search-path-specification->sexp merge-search-path-specifications @@ -197,6 +198,11 @@ representation." (file-pattern search-path-specification-file-pattern ;#f | string (default #f))) +(define %base-search-path-specifications + (list (search-path-specification + (variable "PATH") + (files (list "bin" "sbin"))))) + (define (search-path-specification->sexp spec) "Return an sexp representing SPEC, a . The sexp corresponds to the arguments expected by `set-path-environment-variable'." diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index bb2ce53..237cefa 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -56,11 +56,9 @@ path value is appended." (if (and current (not pure?)) (string-append value separator current) value))))) - (cons* (search-path-specification - (variable "PATH") - (files '("bin" "sbin"))) - (delete-duplicates - (append-map package-native-search-paths inputs)))))) + (append %base-search-path-specifications + (delete-duplicates + (append-map package-native-search-paths inputs)))))) ;; Protect some env vars from purification. Borrowed from nix-shell. (define %precious-variables diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index da95d45..e5c7354 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -394,9 +394,10 @@ current settings and report only settings not already effective." (let* ((packages (filter-map manifest-entry->package entries)) (search-paths (merge-search-path-specifications - (delete-duplicates - (append-map package-native-search-paths - packages))))) + (append %base-search-path-specifications + (delete-duplicates + (append-map package-native-search-paths + packages)))))) (filter-map search-path-definition search-paths)))) (define (display-search-paths entries profile) -- 2.1.4 --=-=-= Content-Type: text/plain -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate --=-=-=--