Le 2018-05-25 03:07, Jone a écrit :
Thanks, Julien.
Minimal working variant:

Hi Jone, if your package builds, you can keep it as is. I don't see any big problem, only a few styling issues that are really issues if you want to submit this as
a patch to guix. Otherwise, you've done a great job! :)


(use-modules
 (ice-9 match)
 (srfi srfi-1)
 (guix gexp)

I don't think you need these three first modules.

 (guix licenses)
 (guix build-system gnu)
 (guix packages)
 (gnu packages)
 (gnu packages gettext)
 (gnu packages pkg-config)
 (gnu packages glib)
 (gnu packages gtk)
 (gnu packages linux)
 (gnu packages audio))
(define-public gvolwheel
  (package
   (name "gvolwheel")
   (version "-1.0")

version numbers usually don't start with "-". The complete name for this package would be
[email protected] which is a bit strange.

(source (local-file "/home/jone/Desktop/gvolwheel-1.0" #:recursive? #t))

if you want to submit this as a patch, you should use a public url or repository. Otherwise
this is fine, especially for testing local changes.

   (build-system gnu-build-system)
   ;; see https://github.com/pjotrp/guix-notes/blob/master/HACKING.org
   (arguments
        '(#:phases
          (modify-phases %standard-phases
                                         (delete 'check))))

instead of removing the phase, you can remove tests by specifying "#:tests? #f" instead of "#:phases (modify-phases ...)". It's a bit shorter and more understandable I think.

   (native-inputs
        `(("pkg-config" ,pkg-config)
          ("intltool" ,intltool)
          ("gettext" ,gettext-minimal)))
   (inputs
        `(("alsa-lib" ,alsa-lib)
          ("gtk+" ,gtk+)))

The indentation is a bit off here.

   (synopsis "Volume control")
   (description "ALSA mixer")

For Guix packages, the description should be a bit longer and end with a period (".").

   (home-page "https://sourceforge.net/projects/gvolwheel";)
   (license gpl2)))
gvolwheel

In this file, it's not necessary to define the package and call it, you can simply have
something like:

(use-modules ...)
(package
  (name "gvolwheel")
  ...)

Again, these are only styling issues you should care about if you want to add the package to our package list. In that case, you should also move this definition to gnu/packages/audio.scm where I think this belongs to. As your first package, we would have taken care of these issues ourselves. We don't expect newcomers to know all these rules and conventions.


What else should I fix in this package definition?

Nothing really, so congrats for your first package!


Reply via email to