Subject: Re: bug#59974: My GNU Health package

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 16 Jan 2023 09:57:25 -0500

Hi Petr,

phodina <[email-masked]> writes:

> Hi Simon,
>
>> > + (arguments
>> > + (list #:phases #~(modify-phases %standard-phases
>> > + (add-after 'install 'wrap-executable
>> > + (lambda* (#:key inputs outputs #:allow-other-keys)
>> > + (let ((out (assoc-ref outputs "out"))
>> > + (qml "/lib/qt5/qml"))
>> > + (wrap-program (string-append #$output
>> > + "/bin/mygnuhealth")
>> > + `("QML2_IMPORT_PATH" ":" prefix
>> > + (,(string-append out qml)
>> > + ,@(map (lambda (i)
>> > + (string-append
>> > + (assoc-ref inputs i) qml))
>> > + '("kirigami"
>> > + "qtdeclarative"
>> > + "qtgraphicaleffects"
>> > + "qtquickcontrols"
>> > + "qtquickcontrols2"))))))))
>> 
>> 
>> Here, I have another indentation. I do not have an opinion.
>
> To me it's also reasonable. I just use 'guix style PKG' and fix the results if they have weird indentation.
>
>> 
>> > + (add-before 'check 'env-setup
>> > + (lambda* _
>> 
>> -^
>> Why?
>> 
>> Is lambda is not enough here?
>
> I guess it was just copy paste of the the previous phase and I realized the keywords aren't necessary. Fixed to use just lambda as suggested. 
>
> I also made some small changes to use gexp and 'out' variable in the phase 'wrap-executable'.

Would wrap-script instead of wrap-program work here (I think it does for
Python and other interpreted languages)?  This tends to produce cleaner
--help message, when $0 (arg0) is used in these, and it looks better in
'top' since there's only one script and not a .mygnuhealth-real wrapped
one.

Otherwise LGTM, thanks for Simon for the review!

-- 
Thanks,
Maxim