Eric Bavier <ericbav...@gmail.com> skribis: > An updated patch is attached. I changed some of the wording in the > wrap-program docstring to bring it in a bit more in line with the new > behavior. Let me know if there should be any more adjustments there. I > also took the liberty of changing "/nix" to "/gnu". ;)
Good. :-) >> It would be ideal if a test in tests/build-utils.scm made sure that >> ‘wrap-program’ uses the right file names when called multiple times, >> but I won’t object if the patch doesn’t have it. > > See the new test included in this patch. Rather than checking for the > file outputs of wrap-program, it checks for correct behavior of the > wrapped program. I believe this is more consistent with how > wrap-program is used, and doesn't tie the test to the implementation. Right, good idea. > From 1b09db0a80d94d3a4c798cc6ee811891b34153e1 Mon Sep 17 00:00:00 2001 > From: Eric Bavier <bav...@member.fsf.org> > Date: Sat, 13 Sep 2014 01:05:03 -0500 > Subject: [PATCH] utils: Allow wrap-program to be called multiple times. > > * guix/build/utils.scm (wrap-program): Multiple invocations of > wrap-program for the same file create successive wrappers. Adjust > docstring. > * tests/build-utils.scm: Test new wrap-program behavior. > (%store): New variable. Looks good to me. One last thing: > (define-module (test-build-utils) > + #:use-module (guix store) > + #:use-module (guix derivations) > #:use-module (guix build utils) > - #:use-module (srfi srfi-64)) > + #:use-module (guix packages) > + #:use-module (guix build-system) > + #:use-module (guix build-system trivial) > + #:use-module (gnu packages) > + #:use-module (gnu packages bootstrap) > + #:use-module (srfi srfi-34) > + #:use-module (srfi srfi-64) > + #:use-module (rnrs io ports) > + #:use-module (ice-9 popen)) > > +(define %store > + (false-if-exception (open-connection))) > + > +(when %store > + ;; Make sure we build everything by ourselves. > + (set-build-options %store #:use-substitutes? #f)) These two forms can be replaced with: (define %store (open-connection-for-tests)) with the addition of #:use-module (guix tests). OK to commit with this change. Thank you! Ludo’.