l...@gnu.org (Ludovic Courtès) skribis:

> Nikita Karetnikov <nik...@karetnikov.org> skribis:
>
>> --- a/guix/build/utils.scm
>> +++ b/guix/build/utils.scm
>> @@ -680,8 +680,8 @@ contents:
>>  This is useful for scripts that expect particular programs to be in $PATH, 
>> for
>>  programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, 
>> or
>>  modules in $GUILE_LOAD_PATH, etc."
>> -  (let ((prog-real (string-append "." prog "-real"))
>> -        (prog-tmp  (string-append "." prog "-tmp")))
>> +  (let ((prog-real (string-append (dirname prog) "/." (basename prog) 
>> "-real"))
>> +        (prog-tmp  (string-append (dirname prog) "/." (basename prog) 
>> "-tmp")))
>
> OK.
>
>>      (define (export-variable lst)
>>        ;; Return a string that exports an environment variable.
>>        (match lst
>> @@ -709,11 +709,11 @@ modules in $GUILE_LOAD_PATH, etc."
>>      (with-output-to-file prog-tmp
>>        (lambda ()
>>          (format #t
>> -                "#!~a~%~a~%exec ~a~%"
>> +                "#!~a~%~a~%exec ~a $@~%"
>
> Make it "#!~a~%~a~%exec ~a \"$@\"~%".
>
>>                  (which "bash")
>>                  (string-join (map export-variable vars)
>>                               "\n")
>> -                (canonicalize-path prog-real))))
>> +                prog-real)))
>
> Keep ‘canonicalize-path’ here, it doesn’t hurt.

I’ve applied your patch with these modifications.

Thanks,
Ludo’.

Reply via email to