all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Simple configure-make-make_install with Guix
  2018-05-24 22:48 Simple configure-make-make_install with Guix Jone
@ 2018-05-24 19:53 ` Julien Lepiller
  2018-05-25  1:07   ` Jone
  0 siblings, 1 reply; 5+ messages in thread
From: Julien Lepiller @ 2018-05-24 19:53 UTC (permalink / raw)
  To: Jone; +Cc: help-guix

Le Thu, 24 May 2018 22:48:48 +0000,
Jone <yeger9@gmail.com> a écrit :

> Hello! I'm wondering, how could I operate with unpacked sources?
> So far I see only this:
> 
>   guix build -f /home/jone/Desktop/template.scm
> guix build: error: #<unspecified>: not something we can build

Hi Jone,

your file should evaluate to a package, not simply define it.
http://www.gnu.org/software/guix/manual/html_node/Additional-Build-Options.html#Additional-Build-Options
has an example for how to use -f. In your case, adding gvolwheel at the
end of the file should work too. Also, you don't need guix' sources for
that.

> 
> Files:
> 1. template.scm
> (use-modules
>  (ice-9 match)
>  (srfi srfi-1)
>  (guix gexp)
>  (guix licenses)
>  (guix build-system gnu)
>  (guix packages)
>  (gnu packages)
>  (gnu packages glib)
>  (gnu packages gtk)
>  (gnu packages audio))
> (define-public gvolwheel
>   (package
>    (name "gvolwheel")
>    (version "-1.0")
>    (source (local-file "/home/jone/Desktop/gvolwheel-1.0"
> #:recursive? #t)) (build-system gnu-build-system)
>    (native-inputs
> 	`(("pkg-config" ,pkg-config)))
>    (inputs
> 	`(("alsa-lib" ,alsa-lib)
> 	  ("gtk+" ,gtk+)))
>    (synopsis "test")
>    (description "test")
>    (home-page "https://sourceforge.net/projects/gvolwheel")
>    (license gpl2)))
> 
> 2. ls -1 .
> aclocal.m4
> AUTHORS
> ChangeLog
> config.guess
> config.h.in
> config.sub
> configure
> configure.ac
> COPYING
> depcomp
> INSTALL
> install-sh
> ltmain.sh
> Makefile.am
> Makefile.in
> missing
> mkinstalldirs
> NEWS
> pixmaps
> po
> README
> src
> 
> This is just an example (a little harder than "GNU Hello"). I would
> like to learn to build such things.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Simple configure-make-make_install with Guix
@ 2018-05-24 22:48 Jone
  2018-05-24 19:53 ` Julien Lepiller
  0 siblings, 1 reply; 5+ messages in thread
From: Jone @ 2018-05-24 22:48 UTC (permalink / raw)
  To: help-guix

Hello! I'm wondering, how could I operate with unpacked sources?
So far I see only this:

  guix build -f /home/jone/Desktop/template.scm
guix build: error: #<unspecified>: not something we can build

Files:
1. template.scm
(use-modules
 (ice-9 match)
 (srfi srfi-1)
 (guix gexp)
 (guix licenses)
 (guix build-system gnu)
 (guix packages)
 (gnu packages)
 (gnu packages glib)
 (gnu packages gtk)
 (gnu packages audio))
(define-public gvolwheel
  (package
   (name "gvolwheel")
   (version "-1.0")
   (source (local-file "/home/jone/Desktop/gvolwheel-1.0" #:recursive? #t))
   (build-system gnu-build-system)
   (native-inputs
	`(("pkg-config" ,pkg-config)))
   (inputs
	`(("alsa-lib" ,alsa-lib)
	  ("gtk+" ,gtk+)))
   (synopsis "test")
   (description "test")
   (home-page "https://sourceforge.net/projects/gvolwheel")
   (license gpl2)))

2. ls -1 .
aclocal.m4
AUTHORS
ChangeLog
config.guess
config.h.in
config.sub
configure
configure.ac
COPYING
depcomp
INSTALL
install-sh
ltmain.sh
Makefile.am
Makefile.in
missing
mkinstalldirs
NEWS
pixmaps
po
README
src

This is just an example (a little harder than "GNU Hello"). I would like
to learn to build such things.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple configure-make-make_install with Guix
  2018-05-24 19:53 ` Julien Lepiller
@ 2018-05-25  1:07   ` Jone
  2018-05-25  8:18     ` Julien Lepiller
  0 siblings, 1 reply; 5+ messages in thread
From: Jone @ 2018-05-25  1:07 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: help-guix

Thanks, Julien.
Minimal working variant:

(use-modules
 (ice-9 match)
 (srfi srfi-1)
 (guix gexp)
 (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")
   (source (local-file "/home/jone/Desktop/gvolwheel-1.0" #:recursive? #t))
   (build-system gnu-build-system)
   ;; see https://github.com/pjotrp/guix-notes/blob/master/HACKING.org
   (arguments
	'(#:phases
	  (modify-phases %standard-phases
					 (delete 'check))))
   (native-inputs
	`(("pkg-config" ,pkg-config)
	  ("intltool" ,intltool)
	  ("gettext" ,gettext-minimal)))
   (inputs
	`(("alsa-lib" ,alsa-lib)
	  ("gtk+" ,gtk+)))
   (synopsis "Volume control")
   (description "ALSA mixer")
   (home-page "https://sourceforge.net/projects/gvolwheel")
   (license gpl2)))
gvolwheel

What else should I fix in this package definition? 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple configure-make-make_install with Guix
  2018-05-25  1:07   ` Jone
@ 2018-05-25  8:18     ` Julien Lepiller
  2018-05-25 18:33       ` Jone
  0 siblings, 1 reply; 5+ messages in thread
From: Julien Lepiller @ 2018-05-25  8:18 UTC (permalink / raw)
  To: Jone; +Cc: help-guix

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
gvolwheel@-1.0 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!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Simple configure-make-make_install with Guix
  2018-05-25  8:18     ` Julien Lepiller
@ 2018-05-25 18:33       ` Jone
  0 siblings, 0 replies; 5+ messages in thread
From: Jone @ 2018-05-25 18:33 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: help-guix

> .. if you want to submit this as a patch to guix ..

O, no)) It was relatively easy, beginners level.
About the rest - thanks, I will consider this in the next packages.

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

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

- guix gexp is needed, others - really not.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-25 15:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-24 22:48 Simple configure-make-make_install with Guix Jone
2018-05-24 19:53 ` Julien Lepiller
2018-05-25  1:07   ` Jone
2018-05-25  8:18     ` Julien Lepiller
2018-05-25 18:33       ` Jone

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.