From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: [PATCH 1/2] packages: Getting unpatched origin derivations. Date: Tue, 24 Feb 2015 11:54:00 -0600 Message-ID: <1424800441-21696-1-git-send-email-bavier@member.fsf.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQJej-00011S-6g for guix-devel@gnu.org; Tue, 24 Feb 2015 12:52:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQJef-0001s2-54 for guix-devel@gnu.org; Tue, 24 Feb 2015 12:52:25 -0500 Received: from mail2.openmailbox.org ([62.4.1.33]:42080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQJee-0001rn-Va for guix-devel@gnu.org; Tue, 24 Feb 2015 12:52:21 -0500 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 * guix/packages.scm (origin->derivation): Add #:patched? keyword argument. --- guix/packages.scm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 96f3adf..301623b 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -938,7 +938,8 @@ cross-compilation target triplet." (store-lift patch-and-repack)) (define* (origin->derivation source - #:optional (system (%current-system))) + #:optional (system (%current-system)) + #:key (patched? #t)) "When SOURCE is an object, return its derivation for SYSTEM. When SOURCE is a file name, return either the interned file name (if SOURCE is outside of the store) or SOURCE itself (if SOURCE is already a store item.)" @@ -956,14 +957,16 @@ outside of the store) or SOURCE itself (if SOURCE is already a store item.)" (default-guile)) system #:graft? #f))) - (patch-and-repack* source patches - #:inputs inputs - #:snippet snippet - #:flags flags - #:system system - #:modules modules - #:imported-modules modules - #:guile-for-build guile))) + (if patched? + (patch-and-repack* source patches + #:inputs inputs + #:snippet snippet + #:flags flags + #:system system + #:modules modules + #:imported-modules modules + #:guile-for-build guile) + (return source)))) ((and (? string?) (? direct-store-path?) file) (with-monad %store-monad (return file))) -- 1.7.9.5