Subject: Re: [bug#34572] Add Drawpile

From: Ricardo Wurmus <[email-masked]>
Date: Wed, 20 Feb 2019 22:01:30 +0100

Hi pkill9,

> * gnu/packages/graphics.scm (drawpile): New variable.

Thank you for your patch.

[…]
> +(define-public drawpile
> +  (package
> +    (name "drawpile")
> +    (version "2.0.11")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://drawpile.net/files/src/drawpile-" version ".tar.gz"))

Please break this line.

> +       (sha256
> +        (base32
> +         "0h018rxhc0lwpqwmlihalz634nd0xaafk4p2b782djjd87irnjpk"))))
> +    (build-system cmake-build-system)
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)
> +       ("qttools" ,qttools)))
> +    (inputs
> +     `(("qtbase" ,qtbase)
> +       ("qtsvg" ,qtsvg)
> +       ("qtmultimedia" ,qtmultimedia)
> +       ("qtcolorwidgets" ,qtcolorwidgets)
> +       ("karchive" ,karchive)
> +       ("giflib" ,giflib) ; optional
> +       ("kdnssd" ,kdnssd) ; optional
> +       ("miniupnpc" ,(@ (gnu packages upnp) miniupnpc)) ; optional
> +       ("libmicrohttpd" ,(@ (gnu packages gnunet) libmicrohttpd)) ; optional
> +       ("libsodium" ,(@ (gnu packages crypto) libsodium)))) ; optional

Please don’t use these inline module references.

> +    (arguments
> +     `(#:configure-flags (list "-DTESTS=on" "-DCMAKE_BUILD_TYPE=Release" "-DTOOLS=on"
> +                               (string-append "-DLIBQTCOLORWIDGETS_LIBRARY="
> +                                              (assoc-ref %build-inputs "qtcolorwidgets")
> +                                              "/lib/libQtColorWidgets-Qt52.so"))))

Please put “(list” on a new line and then break after every item, so
that you can add comments as to why these flags are required.

I don’t think you need "-DCMAKE_BUILD_TYPE=Release" as we’re building
with “RelWithDebInfo” by default.

> +    (home-page "https://drawpile.net")
> +    (synopsis "Collaborative drawing")

“Collaborative drawing program” would be better.

> +    (license license:gpl3)))

This looks like gpl3+.  See for example:

    https://github.com/drawpile/Drawpile/blob/master/src/server/initsys_systemd.cpp#L9

Please check the licenses more carefully.

Could you please send an updated patch?

-- 
Ricardo