Re: [PATCH] gnu: Add cool-retro-term.

2017-05-05 Thread Petter
Hi Eric,

On Thu, 4 May 2017 22:03:24 -0500
Eric Bavier <ericbav...@centurylink.net> wrote:

> Hello Petter,
> 
> Pushed as f9ff014bf623071b9343265e8a5aa994a10ec9d4 !

Cool! :)

> I ended up whitelisting a few more of the fonts, after verifying their
> licenses, and made some more specific notes on the license of each
> font.

Nice! I appreciate you taking care of this. My interest and knowledge of
licensing is pretty low, so I find this quite daunting at the moment. I'm sure
this will be easier for me when I gain more knowledge.

I see you updated both the snippet and the patch for the settings menu. Good!

Maybe we should start, or perhaps encourage the FSF, to maintain a list of Free
fonts. Guess this isn't the last time we need to determine a font's license.
Just a thought.

> I had to add $out/qml to the wrapper QML2_IMPORT_PATH in order for crt
> to start up.  I figured that was alright, since that path was present
> in your initial patch.

Hm. Yeah, it certainly looks alright; in fact it looks "too alright". I don't
really understand now how this even can work for me without it. This is after
all where the qml for the embedded library is, which I assume is quite
important for the program :)

Aha! I had to investigate and now I get it. I've been using cool-retro-term
since the first time I was able to start it. At this point I built it with
(inputs qml). The wrapper at this point added only cool-retro-term/qml to
QML2_IMPORT_PATH (what you've added again). And QML2_IMPORT_PATH has been set
to this in my terminal environment ever since, and have further been included by
the wrapper script when I've run later builds:
  export QML2_IMPORT_PATH=
  "...988icm-qtquickcontrols-5.7.1/qml${QML2_IMPORT_PATH:+:}$QML2_IMPORT_PATH"

Now, when I went from full qml to qml components, I checked if this was still
required (wasn't thinking). It built and started fine without it so I removed
it.

Good thing you tried it!

> I added the patches to dist_patch_DATA in gnu/local.mk and listed them
> in the commit log too.

Thanks! I'm not familiar with gnu/local.mk. Looks like a build script.

I see you also changed (assoc-ref %build-inputs ..) to use "inputs". Noted!

> It even builds with "--rounds=2" :)

Yay! :)

> Thanks again,
> `~Eric

Thanks yourself! :)
Petter


pgpEkNqQ9N7FL.pgp
Description: OpenPGP digital signature


Re: [PATCH] gnu: Add cool-retro-term.

2017-05-03 Thread Petter
On Tue, 2 May 2017 08:51:06 -0500
Eric Bavier <ericbav...@centurylink.net> wrote:

> Hi Petter,
> 
> Thanks again for your patience with this review.

Hi Eric,

I'm in no rush :)

> "gpl2" in the license field should be "gpl2+" according to
> qmltermwidget license headers.  Could you also include a comment noting
> the component split?  Nothing fancy, just "for qmltermwidget" or so next
> to gpl2+ and "for cool-retro-term" next to gpl3+.

Done. I did it like this:
  (license (list 
license:gpl2+ ; qmltermwidget
license:gpl3+ ; cool-retro-term
;; Fonts
license:silofl1.1
license:x11)

> > > > > and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also
> > > > > needs to be stripped as non-free; from 'FreeLicense.txt':
> > > > > 
> > > > >   "1. The User may not sell copies of the Software for a fee."
> > > > > 
> > > > > The fonts/1979-atari-400-800 font seems to be non-free license, which
> > > > > is not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine
> > > > > at
> > > > > https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html
> > > > >  :
> > > > > 
> > > > >   "These fonts are freeware and may not be offered for sale seperately
> > > > >   or as part of a collection."
> > > > > 
> > > > > The fonts/1982-commodore64 font is licensed under non-free terms; see
> > > > > fonts/1982-commodore64/license.txt
> > > > > 
> > > > > The only mention of a license for fonts/1985-ibm-pc-vga is at
> > > > > http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> > > > > the author says "The license is this: this font is free to use in
> > > > > whatever you want.", but that probably "doesn't count".
> > > > > 
> > > > > I could not find license info for a few of the other fonts.
> > > > > 
> > > > > OTOH I recall a discussion on IRC recently about fonts embedded in
> > > > > packages being treated as non-functional data, and thus OK from a FSDG
> > > > > perspective.  But I would want verification on that.
> > > > 
> > > > Let's see if someone can shine some light on this.
> > > >   
> > > 
> > > Leo pointed me at https://bugs.gnu.org/26588 which references
> > > https://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data
> > >  .
> > > I think many of these fonts would need to be stripped out or
> > > substituted because their license prohibits commercial/non-commercial
> > > redistribution.
> > 
> > Recipe is now removing the following from disk and GUI:
> >   '("1977-apple2"
> > "1977-commodore-pet"
> > "1979-atari-400-800"
> > "1982-commodore64"
> > "1985-ibm-pc-vga")  
> 
> The code you've added to delete these fonts and adjust the source
> accordingly would be better in an origin 'snippet' so that `guix build
> -S cool-retro-term` does not include the fonts.

Done.

> > 
> > Should more be removed?  
> 
> modern-monaco.  It's a font from Apple which is specifically *not*
> freely distributable, but the ttf file is still floating around the
> internet, giving many projects the impression that it is.
> 
> > 
> > What do we do about the fonts without licensing info?  
> 
> I agree with Chris that we need to remove them.

Right, I've made the mental switch now to whitelist rather than blacklist.
The ones that are included now are modern-hermit, modern-pro-font-win-tweaked
and modern-proggy-tiny. The rest are out until proven Free.

Let me know if there are other fonts /we can include/ ;)


Also added a `crt` as a symlink to cool-retro-term.


Thanks Eric and Chris for being so thorough and helpful! Let me know if there
are more issues.


Best,
Petter
From c4b0d4bc32053660476c54a7471c6d312651788a Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 .../cool-retro-term-dont-check-uninit-member.patch |  33 ++
 .../patches/coo

Re: [PATCH] gnu: Add cool-retro-term.

2017-05-03 Thread Petter
On Sun, 30 Apr 2017 13:59:29 -0700
Chris Marusich <cmmarus...@gmail.com> wrote:

> Petter <pet...@mykolab.ch> writes:
> 
> > What do we do about the fonts without licensing info?  
> 
> Unfortunately, "no license" is not a free license:

Yeah, I kinda figured that one just after I sent the e-mail :)

> 
> https://www.gnu.org/licenses/license-list.en.html#NoLicense
> 
> "If source code does not carry a license to give users the four
> essential freedoms, then unless it has been explicitly and validly
> placed in the public domain, it is not free software."
> 
> The FSDG states:
> 
> https://www.gnu.org/distros/free-system-distribution-guidelines.html
> 
> "License Rules
> 
> 'Information for practical use' includes software, documentation,
> fonts, and other data that has direct functional applications. It does
> not include artistic works that have an aesthetic (rather than
> functional) purpose, or statements of opinion or judgment.
> 
> All information for practical use in a free distribution must be
> available in source form. ('Source' means the form of the information
> that is preferred for making changes to it.)
> 
> The information, and the source, must be provided under an appropriate
> free license. We evaluate specific licenses and list our determinations
> in our license list, with separate sections for licenses that are
> suitable for software, documentation, fonts, and other useful works. If
> such a work is released under a disjunction of licenses, the work is
> free as long as at least one of its licenses is free; the system
> developers should follow the terms of the applicable free license(s)
> when they distribute and/or modify it."
> 
> The same page also has a section on fonts:
> 
> https://www.gnu.org/licenses/license-list.en.html#Fonts
> 
> "The licenses below apply to an instantiation of a design in a computer
> file, not the artistic design. As far as we know, an implementation of a
> design is always copyrightable. The legal status of the artistic design
> is complex, and varies by jurisdiction."
> 
> To ensure that this contribution meets these guidelines and respects the
> freedom of the system's users, I think we cannot include a font for
> which we cannot find an associated license.  If we can find a license
> for the font and it is a free license, then we could include it.
> 

Thanks for this information! Licensing is a weak field for me.

I've made a mental change from blacklisting fonts to whitelisting.



pgpxQHPr2Ls67.pgp
Description: OpenPGP digital signature


Re: Doc: reference to guix-devel for submitting patches

2017-04-30 Thread Petter
Hi Chris,

On Sat, 29 Apr 2017 19:48:15 -0700
Chris Marusich  wrote:
> 
> Yes, this wording is unclear.  It could be interpreted as an invitation
> to send bug reports and patches to guix-devel@, which is not quite
> right.
> 
> On related note, I see there is a section on submitting patches ((guix)
> Submitting Patches), but there is no similar, dedicated, section on
> submitting bugs (i.e., to bug-guix).
> 
> >
> > And here,
> > https://www.gnu.org/software/guix/manual/html_node/Packaging-Guidelines.html#Packaging-Guidelines
> > the user is referred to the Contributing node.  
> >> Once your package builds correctly, please send us a patch (see
> >> Contributing).  
> >
> > I think at least one of the latter two nodes could use an update to better
> > inform the soon-to-be-contributor that patches should go to guix-patches.
> > Not sure what the better fix is though.
> >
> > What do you think?
> >  
> 
> Seems to me like we should clarify the wording in the "Contributing"
> section.  And maybe we should add a "Submitting Bug Reports"
> sub-section, similar to the "Submitting Patches" one.
> 
> Do you think you could try your hand at writing this?
> 

Alright, I'll give it a go. Will post to guix-patches then.


pgpiUWPp12uUe.pgp
Description: OpenPGP digital signature


Re: [PATCH] gnu: Add cool-retro-term.

2017-04-28 Thread Petter
 
> 
> Leo pointed me at https://bugs.gnu.org/26588 which references
> https://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data
>  .
> I think many of these fonts would need to be stripped out or
> substituted because their license prohibits commercial/non-commercial
> redistribution.

Recipe is now removing the following from disk and GUI:
  '("1977-apple2"
"1977-commodore-pet"
"1979-atari-400-800"
"1982-commodore64"
"1985-ibm-pc-vga")

Should more be removed?

What do we do about the fonts without licensing info?

Also, I've added 3 patches from lxde/qtermwidget. The 2 with possible security
implications, and 1 memory leak (of those you listed). With the remaining two
you linked, memory leak and perfomance fix, git was unable to apply to the
current qmltermwidget codebase.

Best,
Petter
From 6d386588ae273e3b61e415469fb226379336b15b Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 ...-term-avoid-checking-uninitialized-member.patch |  33 +++
 .../cool-retro-term-dont-check-uninit-member.patch |  33 +++
 .../patches/cool-retro-term-fix-array-size.patch   |  25 ++
 .../patches/cool-retro-term-memory-leak-1.patch|  32 +++
 .../cool-retro-term-remove-non-free-fonts.patch| 268 +
 gnu/packages/terminals.scm |  90 +++
 6 files changed, 481 insertions(+)
 create mode 100644 gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-fix-array-size.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-memory-leak-1.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch

diff --git a/gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch b/gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch
new file mode 100644
index 0..c6e1d2731
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch
@@ -0,0 +1,33 @@
+From 126a97d1f22f7d784d392b2b7d5aadf0a4e18c0d Mon Sep 17 00:00:00 2001
+From: Petter <pet...@mykolab.ch>
+Date: Thu, 27 Apr 2017 20:28:02 +0200
+Subject: [PATCH] Avoid checking uninitialized member + simplify condition
+
+---
+ qmltermwidget/lib/TerminalDisplay.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qmltermwidget/lib/TerminalDisplay.cpp b/qmltermwidget/lib/TerminalDisplay.cpp
+index 189a609..36d2cd2 100644
+--- a/qmltermwidget/lib/TerminalDisplay.cpp
 b/qmltermwidget/lib/TerminalDisplay.cpp
+@@ -325,6 +325,7 @@ TerminalDisplay::TerminalDisplay(QQuickItem *parent)
+ ,_terminalSizeHint(false)
+ ,_terminalSizeStartup(true)
+ ,_bidiEnabled(false)
++,_mouseMarks(false)
+ ,_actSel(0)
+ ,_wordSelectionMode(false)
+ ,_lineSelectionMode(false)
+@@ -1846,7 +1847,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
+   }
+   else if ( ev->button() == Qt::MidButton )
+   {
+-if ( _mouseMarks || (!_mouseMarks && (ev->modifiers() & Qt::ShiftModifier)) )
++if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
+   emitSelection(true,ev->modifiers() & Qt::ControlModifier);
+ else
+   emit mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch b/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
new file mode 100644
index 0..c6e1d2731
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
@@ -0,0 +1,33 @@
+From 126a97d1f22f7d784d392b2b7d5aadf0a4e18c0d Mon Sep 17 00:00:00 2001
+From: Petter <pet...@mykolab.ch>
+Date: Thu, 27 Apr 2017 20:28:02 +0200
+Subject: [PATCH] Avoid checking uninitialized member + simplify condition
+
+---
+ qmltermwidget/lib/TerminalDisplay.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qmltermwidget/lib/TerminalDisplay.cpp b/qmltermwidget/lib/TerminalDisplay.cpp
+index 189a609..36d2cd2 100644
+--- a/qmltermwidget/lib/TerminalDisplay.cpp
 b/qmltermwidget/lib/TerminalDisplay.cpp
+@@ -325,6 +325,7 @@ TerminalDisplay::TerminalDisplay(QQuickItem *parent)
+ ,_terminalSizeHint(false)
+ ,_terminalSizeStartup(true)
+ ,_bidiEnabled(false)
++,_mouseMarks(false)
+ ,_actSel(0)
+ ,_wordSelectionMode(false)
+ ,_lineSelectionMode(false)
+@@ -1846,7 +1847,7 @@ void TerminalDisplay::mousePressEvent(Q

Re: We need an RFC procedure [Re: Services can now have a default value]

2017-04-27 Thread Petter
If I may make a suggestion, coming from a place of ignorance.

How about a stable branch that would be opt-in?

On Thu, 27 Apr 2017 15:29:53 +0200
l...@gnu.org (Ludovic Courtès) wrote:

> Ricardo Wurmus  skribis:
> 
> > It’s a little unfortunate that packages are developed together with
> > everything else, because this means that there is no way for people to
> > opt out of breaking changes until the next release without also opting
> > out of getting any updates at all.  
> 
> It’s both a strength and a weakness I guess.  The good thing is that we
> can make changes that affect everything at once.  The bad thing is what
> you mention.
> 
> We could use feature branches more, with the downside that they would
> probably get little additional testing, precisely because one would have
> to choose between features and packages.
> 
> Thoughts?
> 
> Ludo’.
> 




Re: [PATCH] gnu: Add cool-retro-term.

2017-04-26 Thread Petter
On Tue, 25 Apr 2017 22:36:27 -0500
Eric Bavier <ericbav...@centurylink.net> wrote:

> Could you ping the developer about porting some of these fixes to their
> fork?  I think we'd want to create a local patch for at least the first
> commit.  The others could wait for a new release.

Sure, I'll do that!

> > +(inputs
> > + `(("qt" ,qt)))  
> 
> Does this package need all of qt, or could we use the component
> packages instead?

I don't know. I'll do some experiments and see.

> > +(synopsis "Terminal emulator mimicking old cathode ray tube (CRT)
> > +screens")  
> 
> I'd like to shorten this to "Terminal emulator"

Ok.

> > +(description
> > + "Cool-retro-term (crt) is a terminal emulator which mimics the
> > look and +feel of the old cathode ray tube (CRT) screens.  It has been
> > designed to be +eye-candy, customizable, and reasonably lightweight.")
> > +(home-page "https://github.com/Swordfish90/cool-retro-term;)
> > +(license (list license:gpl2 license:gpl3)  
> 
> The license seems unclear: 1) there is both a gpl-2.txt and gpl-3.txt
> in $topsrcdir, but no mention of which actually applies in any of the
> source files, 2) $topsrcdir/packaging/debian/copyright claims GPL-3,
> while 4) $topsrcdir/packaging/rpm/cool-retro-term.spec and
> $topsrcdir/packaging/appdata/cool-retro-term.appdata.xml both claim
> GPL-3.0+, and 5) the qmltermwidget component appears to be under
> gpl2+.  IANAL but this suggests license:gpl2+ to me.  Does that seem
> right?

I can't answer this, hopefully someone else will chime in.

> It would not hurt to also list the SIL license, for
> $topsrcdir/app/qml/fonts/modern-hermit, and the X11 license for
> fonts/modern-pro-font-win-tweaked and fonts/modern-proggy-tiny.
> 
> The fonts/modern-envy-code-r font probably needs to be stripped; it's
> license is non-free; from 'Read Me.txt':
> 
>   "Free to use but redistribution prohibited."
> 
> and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also needs
> to be stripped as non-free; from 'FreeLicense.txt':
> 
>   "1. The User may not sell copies of the Software for a fee."
> 
> The fonts/1979-atari-400-800 font seems to be non-free license, which is
> not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine at
> https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html
>  :
> 
>   "These fonts are freeware and may not be offered for sale seperately
>   or as part of a collection."
> 
> The fonts/1982-commodore64 font is licensed under non-free terms; see
> fonts/1982-commodore64/license.txt
> 
> The only mention of a license for fonts/1985-ibm-pc-vga is at
> http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> the author says "The license is this: this font is free to use in
> whatever you want.", but that probably "doesn't count".
> 
> I could not find license info for a few of the other fonts.
> 
> OTOH I recall a discussion on IRC recently about fonts embedded in
> packages being treated as non-functional data, and thus OK from a FSDG
> perspective.  But I would want verification on that.

Let's see if someone can shine some light on this.

> Sorry for the dump.  I'd like to work these things out; it looks like a
> fun terminal to use.

No problem, there's the right way and there's the not-right way!
Let's do it right! :)

Best,
Petter


pgpcNkcNzaue4.pgp
Description: OpenPGP digital signature


Doc: reference to guix-devel for submitting patches

2017-04-26 Thread Petter
Hi Guix,

I quite recently realized I sent a couple of patches to guix-devel, whereas
they should now go to guix-patches. I use the online manual and the current
state is that there's a couple of references to guix-devel for submitting
patches.

https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html#Submitting-Patches
>We welcome contributions in the form of patches as produced by git format-patch
> sent to the mailing list
Where "mailing list" is mailto:guix-devel@gnu.org. This is updated in the
repository however, so I assume the online manual will reflect this shortly.


But here,
https://www.gnu.org/software/guix/manual/html_node/Contributing.html#Contributing
it says
> Please get in touch with us on guix-devel@gnu.org and #guix on the Freenode
> IRC network. We welcome ideas, bug reports, patches, and anything that may be
> helpful to the project.

And here,
https://www.gnu.org/software/guix/manual/html_node/Packaging-Guidelines.html#Packaging-Guidelines
the user is referred to the Contributing node.
> Once your package builds correctly, please send us a patch (see Contributing).

I think at least one of the latter two nodes could use an update to better
inform the soon-to-be-contributor that patches should go to guix-patches. Not
sure what the better fix is though.

What do you think?

Best,
Petter



Re: [PATCH] gnu: Add Xfce Notification Daemon.

2017-04-26 Thread Petter
On Wed, 26 Apr 2017 16:39:19 +0200
Marius Bakke <mba...@fastmail.com> wrote:
> 
> Takk! Pushed as b63106089a1eb2ac76303886f926f74967879386.
> 
> By the way, patches should now be sent to the new "guix-patc...@gnu.org"
> issue tracker. :-)

Supert! :)

Yes, I realized this a couple of days ago. I'll write an e-mail discussing
the state of this in the online manual.

Best,
Petter


pgpekWAYB0lrT.pgp
Description: OpenPGP digital signature


Re: [PATCH] gnu: Add Xfce Notification Daemon.

2017-04-26 Thread Petter
I forgot to wrap "org.freedesktop.Notifications" in the description in 
@code{..}, as suggested by Marius. Here it is with this as well.


From 922cbeb402ece8dbd0d592489069d7ccda64d702 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 21 Apr 2017 15:33:22 +0200
Subject: [PATCH] gnu: Add Xfce Notification Daemon.

* gnu/packages/xfce.scm (xfce4-notifyd): New variable.
---
 gnu/packages/xfce.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index fce47d93c..c8786dd69 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Florian Paul Schmidt <mista.ta...@gmx.net>
 ;;; Copyright © 2016 Kei Kebreau <k...@openmailbox.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
@@ -850,3 +852,33 @@ calendar applications.  It also includes a panel clock 
plugin and an
 international clock application capable of simultaneously showing clocks from
 several different time zones.")
 (license gpl2+)))
+
+(define-public xfce4-notifyd
+  (package
+(name "xfce4-notifyd")
+(version "0.3.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://archive.xfce.org/src/apps/;
+  name "/" (version-major+minor version) "/"
+  name "-" version ".tar.bz2"))
+  (sha256
+   (base32
+"1ybcfqfynr33g5hp2lgq17s8qyx7rq6fd2iwrpwcvm6kml6prjpl"
+(build-system glib-or-gtk-build-system)
+(native-inputs
+ `(("intltool" ,intltool)
+   ("pkg-config" ,pkg-config)))
+(inputs
+ `(("libxfce4ui" ,libxfce4ui)
+   ("libnotify" ,libnotify)))
+(home-page "https://goodies.xfce.org/projects/applications/xfce4-notifyd;)
+(synopsis "Show notification bubbles on Xfce")
+(description
+ "The Xfce Notify Daemon (xfce4-notifyd for short) is a smallish program
+that implements the “server-side” portion of the Freedesktop desktop
+notifications specification.  Applications that wish to pop up a notification
+bubble in a standard way can implicitly make use of xfce4-notifyd to do so by
+sending standard messages over D-Bus using the
+@code{org.freedesktop.Notifications} interface.")
+(license gpl2)))
-- 
2.12.2



pgpGAwn96HKFK.pgp
Description: OpenPGP digital signature


Re: [PATCH] gnu: Add Xfce Notification Daemon.

2017-04-26 Thread Petter
Hi Efraim,

On Mon, 24 Apr 2017 22:22:43 +0300
Efraim Flashner <efr...@flashner.co.il> wrote:

> The collection of inputs makes me wonder if it should be glib-or-gtk
> build-system and not "just" gnu-build-system. I don't have a good way to
> test if its necessary, but I'd look around.

Here's an updated patch using glib-or-gtk-build-system. I've removed
superfluous inputs, some where even superfluous with the gnu-build-system as
well, (I initially based the inputs on the build instructions provided with
the package). It's quite tidy now :)

Best,
Petter

From 75dfd4702327021481339ce9928ce5be17db45be Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 21 Apr 2017 15:33:22 +0200
Subject: [PATCH] gnu: Add Xfce Notification Daemon.

* gnu/packages/xfce.scm (xfce4-notifyd): New variable.
---
 gnu/packages/xfce.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index fce47d93c..6ec9f241b 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Florian Paul Schmidt <mista.ta...@gmx.net>
 ;;; Copyright © 2016 Kei Kebreau <k...@openmailbox.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
@@ -850,3 +852,33 @@ calendar applications.  It also includes a panel clock 
plugin and an
 international clock application capable of simultaneously showing clocks from
 several different time zones.")
 (license gpl2+)))
+
+(define-public xfce4-notifyd
+  (package
+(name "xfce4-notifyd")
+(version "0.3.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://archive.xfce.org/src/apps/;
+  name "/" (version-major+minor version) "/"
+  name "-" version ".tar.bz2"))
+  (sha256
+   (base32
+"1ybcfqfynr33g5hp2lgq17s8qyx7rq6fd2iwrpwcvm6kml6prjpl"
+(build-system glib-or-gtk-build-system)
+(native-inputs
+ `(("intltool" ,intltool)
+   ("pkg-config" ,pkg-config)))
+(inputs
+ `(("libxfce4ui" ,libxfce4ui)
+   ("libnotify" ,libnotify)))
+(home-page "https://goodies.xfce.org/projects/applications/xfce4-notifyd;)
+(synopsis "Show notification bubbles on Xfce")
+(description
+ "The Xfce Notify Daemon (xfce4-notifyd for short) is a smallish program
+that implements the “server-side” portion of the Freedesktop desktop
+notifications specification.  Applications that wish to pop up a notification
+bubble in a standard way can implicitly make use of xfce4-notifyd to do so by
+sending standard messages over D-Bus using the org.freedesktop.Notifications
+interface.")
+(license gpl2)))
-- 
2.12.2



pgpIg7INXESP1.pgp
Description: OpenPGP digital signature


Re: Fail to run : guix packckage -u git --fallback

2017-04-25 Thread Petter
Hi tumashu,

On Tue, 25 Apr 2017 20:53:05 +0800 (CST)
tumashu <tuma...@163.com> wrote:

> IOError: [Errno 28] No space left on device:

Did you notice this part?

Best,
Petter



Re: [PATCH] gnu: Add Xfce Notification Daemon.

2017-04-24 Thread Petter
Hei Marius,

> > +(native-inputs
> > + `(("intltool" ,intltool)
> > +   ("pkg-config" ,pkg-config)))
> > +(propagated-inputs
> > + `(("glib:bin" ,glib "bin")))  
> 
> Do you know why glib:bin needs to be propagated here? Looking at
> gnome.scm, it's usually a "native-input". If this program requires
> some of the executables from that package at runtime, it's better to
> patch it with the absolute paths.

I don't know. I just saw it done like this in another package in
xfce.scm.

Reading up on inputs I see propagated-inputs "will be installed
alongside the package they belong to". Yeah, let's see if we can avoid
that.

I've adjusted the recipe to test with glib:bin as a native-input,
it builds fine, and a quick remove and install shows no issues either.
However, the notification system still worked with it removed, so I'm
not certain the new one is the one used. I will test this further next
time I boot my system.

> Other than that looks great! I'd add an @code{...} wrapper around
> "org.freedesktop.Notifications" in the description, but that can be
> fixed up before committing, no need for a new patch.

I'll make sure to add this if I produce a new patch.

Thanks for the feedback!

Best,
Petter


pgpRiM1Od8iDq.pgp
Description: OpenPGP digital signature


Re: [PATCH] gnu: Add Xfce Notification Daemon.

2017-04-24 Thread Petter
Hi again,

Forgot previously to run `guix lint` on this; added a space between
sentences now.

Also rewrote the synopsis.

Best,
Petter


From 2a31bcfa1b39c9403fb2dab3ab073def3ab8e140 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 21 Apr 2017 15:33:22 +0200
Subject: [PATCH] gnu: Add Xfce Notification Daemon.

* gnu/packages/xfce.scm (xfce4-notifyd): New variable.
---
 gnu/packages/xfce.scm | 39 +++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index fce47d93c..00d958cc8 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Florian Paul Schmidt <mista.ta...@gmx.net>
 ;;; Copyright © 2016 Kei Kebreau <k...@openmailbox.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -850,3 +851,41 @@ calendar applications.  It also includes a panel clock 
plugin and an
 international clock application capable of simultaneously showing clocks from
 several different time zones.")
 (license gpl2+)))
+
+(define-public xfce4-notifyd
+  (package
+(name "xfce4-notifyd")
+(version "0.3.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://archive.xfce.org/src/apps/;
+  name "/" (version-major+minor version) "/"
+  name "-" version ".tar.bz2"))
+  (sha256
+   (base32
+"1ybcfqfynr33g5hp2lgq17s8qyx7rq6fd2iwrpwcvm6kml6prjpl"
+(build-system gnu-build-system)
+(arguments
+ `(#:configure-flags
+   (list (string-append "--prefix=" %output
+(native-inputs
+ `(("intltool" ,intltool)
+   ("pkg-config" ,pkg-config)))
+(propagated-inputs
+ `(("glib:bin" ,glib "bin")))
+(inputs
+ `(("gtk+" ,gtk+)
+   ("libxfce4util" ,libxfce4util)
+   ("libxfce4ui" ,libxfce4ui)
+   ("xfconf" ,xfconf)
+   ("libnotify" ,libnotify)))
+(home-page "https://goodies.xfce.org/projects/applications/xfce4-notifyd;)
+(synopsis "Show notification bubbles on Xfce")
+(description
+ "The Xfce Notify Daemon (xfce4-notifyd for short) is a smallish program
+that implements the “server-side” portion of the Freedesktop desktop
+notifications specification.  Applications that wish to pop up a notification
+bubble in a standard way can implicitly make use of xfce4-notifyd to do so by
+sending standard messages over D-Bus using the org.freedesktop.Notifications
+interface.")
+(license gpl2)))
-- 
2.12.2



On Fri, 21 Apr 2017 15:37:45 +0200
Petter <pet...@mykolab.ch> wrote:

> Hi Guix,
> 
> Be extra critical while reviewing this patch, I'm not good at this.
> 
> (Today I learned that a provided DBus service file first takes effect
> after installing. I wasn't having any luck testing directly from
> store. Thanks again wingo!)
> 
> Best,
> Petter

From 2a31bcfa1b39c9403fb2dab3ab073def3ab8e140 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 21 Apr 2017 15:33:22 +0200
Subject: [PATCH] gnu: Add Xfce Notification Daemon.

* gnu/packages/xfce.scm (xfce4-notifyd): New variable.
---
 gnu/packages/xfce.scm | 39 +++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index fce47d93c..00d958cc8 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Florian Paul Schmidt <mista.ta...@gmx.net>
 ;;; Copyright © 2016 Kei Kebreau <k...@openmailbox.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -850,3 +851,41 @@ calendar applications.  It also includes a panel clock plugin and an
 international clock application capable of simultaneously showing clocks from
 several different time zones.")
 (license gpl2+)))
+
+(define-public xfce4-notifyd
+  (package
+(name "xfce4-notifyd")
+(version "0.3.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://archive.xfce.org/src/apps/;
+  name "/" (version-major+minor version) "/"
+  name "-" version ".tar.bz2"))
+  (sha256
+   (base32
+"1ybcfqfynr33g5hp2lgq17s8qyx7rq6fd2iwrpwcvm6kml6prjpl"
+(build-system gnu-build-system)
+(arguments
+ `(#:con

Re: [PATCH] gnu: Add cool-retro-term.

2017-04-24 Thread Petter
Hi Chris,

> 
> By the way, the output of 'guix lint' points out the following:

Oh lint, I had forgotten about that.

> --8<---cut here---start->8---
> [0] marusich@garuda:~/guix
> $ ./pre-inst-env guix lint cool-retro-term
> gnu/packages/terminals.scm:493:5: cool-retro-term@1.0.0-1.e4871
> 9f: sentences in description should be followed by two spaces; 
> possible infraction at 117
> checking cool-retro-term@1.0.0-1.e48719f [inputs-should-be-nati
> checking cool-retro-term@1.0.0-1.e48719f [inputs-should-not-be-
> gnu/packages/terminals.scm:490:14: cool-retro-term@1.0.0-1.e487
> 19f: synopsis should be less than 80 characters long  
> [0] marusich@garuda:~/guix
> $
> --8<---cut here---end--->8---
> 
> Think you could submit one more patch to tidy up those?  Anyway, I
> can't commit your patch (I don't have commit access), but somebody
> else probably can.

I sure can. Thanks for helping out!

I lowercased the Cool-retro-term abbreviation, (crt). I think it's a
little better, but no strong feelings.

What do you think of adding `crt` as an alternative name
for the binary? I see it's been briefly discussed here,
https://github.com/Swordfish90/cool-retro-term/issues/258

> Love this contribution, by the way.  I'm sending an email from within
> CRT right now...!  :-)

Glad you enjoy it! I'm fond of it too, it makes the whole terminal
experience more engaging/alive or something :)

Unfortunately it has the capasity to introduce lag in my entire system.
F.ex. scrolling and changing tabs in Icecat would take noticeable time
with the default effects settings. I've adjusted them a bit, and
got the lag under control. Is this the case for you as well? I'm on an
x200.

Best,
Petter


From 553902e8a736f356bdc5c7a5bf28e339f9f5cde6 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62
  ++ 1 file changed, 62
  insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..e53062b16 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García
<jm...@openmailbox.org> ;;; Copyright © 2017 Tobias Geerinckx-Rice
<m...@tobias.gr> ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on
its behalf.  It avoids calling @code{malloc} during normal running
state, allowing it to be used in embedded kernel situations.")
 (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+(revision "1"))
+  (package
+(name "cool-retro-term")
+(version (string-append "1.0.0-" revision "." (string-take commit
7)))
+(source (origin
+  (method git-fetch)
+  (modules '((guix build utils)))
+  (file-name (string-append name "-" version "-checkout"))
+  (uri (git-reference
+(url (string-append
"https://github.com/Swordfish90/; name))
+(commit commit)
+(recursive? #t)))
+  (sha256
+   (base32
"1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"
+(build-system gnu-build-system)
+(inputs
+ `(("qt" ,qt)))
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (replace 'configure
+  (lambda* (#:key outputs #:allow-other-keys)
+(let ((out (assoc-ref outputs "out")))
+  (substitute* '("qmltermwidget/qmltermwidget.pro")
+(("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+ (string-append "INSTALL_DIR = " out "/qml")))
+  (substitute* '("app/app.pro")
+(("target.path \\+= /usr")
+ (string-append "target.path += " out))
+(("icon32.path = /usr/share")
+ (string-append "icon32.path = " out "/share"))
+(("icon64

Re: [PATCH] gnu: Add cool-retro-term.

2017-04-23 Thread Petter
On Sun, 23 Apr 2017 12:18:05 -0700
Chris Marusich <cmmarus...@gmail.com> wrote:

> Petter <pet...@mykolab.ch> writes:
> 
> > Hi Guix,
> >
> > The past is finally here! Had a go at packaging a terminal emulator
> > which mimics old cathode displays :)  
> 
> Wow!!  This is really fun.  Thanks for packaging it!

:)

> > +   (modify-phases %standard-phases
> > + (replace 'configure
> > +  (lambda* (#:key outputs #:allow-other-keys)
> > +(let ((out (assoc-ref outputs "out")))
> > +  (substitute*
> > '("qmltermwidget/qmltermwidget.pro")
> > +(("INSTALL_DIR =
> > \\$\\$\\[QT_INSTALL_QML\\]")
> > + (string-append "INSTALL_DIR = " out
> > "/qml")))
> > +  (substitute* '("app/app.pro")
> > +(("target.path \\+= /usr")
> > + (string-append "target.path += " out))
> > +(("icon32.path = /usr/share")
> > + (string-append "icon32.path = " out))
> > +(("icon64.path = /usr/share")
> > + (string-append "icon64.path = " out))
> > +(("icon128.path = /usr/share")
> > + (string-append "icon128.path = " out))
> > +(("icon256.path = /usr/share")
> > + (string-append "icon256.path = " out)))
> > +  (zero? (system* "qmake")  
> 
> Should these icons be put somewhere else, like in the $out/share path?
> If it works, it works, though.  (info '(standards) Directory
> Variables'):

Indeed, I've fixed it.

> > +(synopsis "terminal emulator which mimics the look and feel of
> > the old +cathode tube screens")
> > +(description
> > + "Cool-retro-term is a terminal emulator which mimics the look
> > and feel of +the old cathode tube screens. It has been designed to
> > be eye-candy, +customizable, and reasonably lightweight.")  
> 
> Just minor feedback: Maybe use the phrases "CRT" and "cathode ray
> tube" to make this easier to discover?
> 

Sure! Added your suggestions in the updated patch.

Thanks for the feedback!

Best,
Petter


From 453f6c6c2017c8598b29690b245f76d691d09870 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62
  ++++++ 1 file changed, 62
  insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..69ca46c98 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García
<jm...@openmailbox.org> ;;; Copyright © 2017 Tobias Geerinckx-Rice
<m...@tobias.gr> ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on
its behalf.  It avoids calling @code{malloc} during normal running
state, allowing it to be used in embedded kernel situations.")
 (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+(revision "1"))
+  (package
+(name "cool-retro-term")
+(version (string-append "1.0.0-" revision "." (string-take commit
7)))
+(source (origin
+  (method git-fetch)
+  (modules '((guix build utils)))
+  (file-name (string-append name "-" version "-checkout"))
+  (uri (git-reference
+(url (string-append
"https://github.com/Swordfish90/; name))
+(commit commit)
+(recursive? #t)))
+  (sha256
+   (base32
"1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"
+(build-system gnu-build-system)
+(inputs
+ `(("qt" ,qt)))
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (

[PATCH] gnu: Add cool-retro-term.

2017-04-23 Thread Petter
Hi Guix,

The past is finally here! Had a go at packaging a terminal emulator
which mimics old cathode displays :)

Let me know if there are issues!

Best,
Petter


From 5b71b1613af82b2a5b36d7c1395c27afb0842255 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62 ++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..4cb9cee4b 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jm...@openmailbox.org>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <m...@tobias.gr>
 ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on its 
behalf.  It avoids
 calling @code{malloc} during normal running state, allowing it to be used in
 embedded kernel situations.")
 (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+(revision "1"))
+  (package
+(name "cool-retro-term")
+(version (string-append "1.0.0-" revision "." (string-take commit 7)))
+(source (origin
+  (method git-fetch)
+  (modules '((guix build utils)))
+  (file-name (string-append name "-" version "-checkout"))
+  (uri (git-reference
+(url (string-append "https://github.com/Swordfish90/; 
name))
+(commit commit)
+(recursive? #t)))
+  (sha256
+   (base32 
"1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"
+(build-system gnu-build-system)
+(inputs
+ `(("qt" ,qt)))
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (replace 'configure
+  (lambda* (#:key outputs #:allow-other-keys)
+(let ((out (assoc-ref outputs "out")))
+  (substitute* '("qmltermwidget/qmltermwidget.pro")
+(("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+ (string-append "INSTALL_DIR = " out "/qml")))
+  (substitute* '("app/app.pro")
+(("target.path \\+= /usr")
+ (string-append "target.path += " out))
+(("icon32.path = /usr/share")
+ (string-append "icon32.path = " out))
+(("icon64.path = /usr/share")
+ (string-append "icon64.path = " out))
+(("icon128.path = /usr/share")
+ (string-append "icon128.path = " out))
+(("icon256.path = /usr/share")
+ (string-append "icon256.path = " out)))
+  (zero? (system* "qmake")
+ (add-before 'install 'fix-Makefiles
+  (lambda* (#:key outputs #:allow-other-keys)
+(let ((out (assoc-ref outputs "out")))
+  (substitute* '("Makefile")
+(("\\$\\(INSTALL_ROOT\\)/usr") out)
+ (add-after 'install 'wrap-executable
+(lambda* (#:key inputs outputs #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out")))
+(wrap-program (string-append out 
"/bin/cool-retro-term")
+  `("QML2_IMPORT_PATH" ":" prefix
+(,(string-append out "/qml"))
+(synopsis "terminal emulator which mimics the look and feel of the old
+cathode tube screens")
+(description
+ "Cool-retro-term is a terminal emulator which mimics the look and feel of
+the old cathode tube screens. It has been designed to be eye-candy,
+customizable, and reasonably lightweight.")
+(home-page "https://github.com/Swordfish90/cool-retro-term;)
+(license (list license:gpl2 license:gpl3)
-- 
2.12.2

From 5b71b1613af82b2a5b36d7c1395c27afb0842255 Mon Sep 17 00:00:00 2001
Fro

[PATCH] gnu: Add Xfce Notification Daemon.

2017-04-21 Thread Petter
Hi Guix,

Be extra critical while reviewing this patch, I'm not good at this.

(Today I learned that a provided DBus service file first takes effect
after installing. I wasn't having any luck testing directly from
store. Thanks again wingo!)

Best,
PetterFrom 4cf9acab0817d2898772830f27c1a11c15926b98 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 21 Apr 2017 15:33:22 +0200
Subject: [PATCH] gnu: Add Xfce Notification Daemon.

* gnu/packages/xfce.scm (xfce4-notifyd): New variable.
---
 gnu/packages/xfce.scm | 39 +++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index fce47d93c..f0e671259 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Florian Paul Schmidt <mista.ta...@gmx.net>
 ;;; Copyright © 2016 Kei Kebreau <k...@openmailbox.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -850,3 +851,41 @@ calendar applications.  It also includes a panel clock plugin and an
 international clock application capable of simultaneously showing clocks from
 several different time zones.")
 (license gpl2+)))
+
+(define-public xfce4-notifyd
+  (package
+(name "xfce4-notifyd")
+(version "0.3.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://archive.xfce.org/src/apps/;
+  name "/" (version-major+minor version) "/"
+  name "-" version ".tar.bz2"))
+  (sha256
+   (base32
+"1ybcfqfynr33g5hp2lgq17s8qyx7rq6fd2iwrpwcvm6kml6prjpl"
+(build-system gnu-build-system)
+(arguments
+ `(#:configure-flags
+   (list (string-append "--prefix=" %output
+(native-inputs
+ `(("intltool" ,intltool)
+   ("pkg-config" ,pkg-config)))
+(propagated-inputs
+ `(("glib:bin" ,glib "bin")))
+(inputs
+ `(("gtk+" ,gtk+)
+   ("libxfce4util" ,libxfce4util)
+   ("libxfce4ui" ,libxfce4ui)
+   ("xfconf" ,xfconf)
+   ("libnotify" ,libnotify)))
+(home-page "https://goodies.xfce.org/projects/applications/xfce4-notifyd;)
+(synopsis "Lets applications pop up a notification bubble")
+(description
+ "The Xfce Notify Daemon (xfce4-notifyd for short) is a smallish program
+that implements the “server-side” portion of the Freedesktop desktop
+notifications specification. Applications that wish to pop up a notification
+bubble in a standard way can implicitly make use of xfce4-notifyd to do so by
+sending standard messages over D-Bus using the org.freedesktop.Notifications
+interface.")
+(license gpl2)))
-- 
2.12.2

From 4cf9acab0817d2898772830f27c1a11c15926b98 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 21 Apr 2017 15:33:22 +0200
Subject: [PATCH] gnu: Add Xfce Notification Daemon.

* gnu/packages/xfce.scm (xfce4-notifyd): New variable.
---
 gnu/packages/xfce.scm | 39 +++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index fce47d93c..f0e671259 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016 Florian Paul Schmidt <mista.ta...@gmx.net>
 ;;; Copyright © 2016 Kei Kebreau <k...@openmailbox.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rek...@elephly.net>
+;;; Copyright © 2017 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -850,3 +851,41 @@ calendar applications.  It also includes a panel clock plugin and an
 international clock application capable of simultaneously showing clocks from
 several different time zones.")
 (license gpl2+)))
+
+(define-public xfce4-notifyd
+  (package
+(name "xfce4-notifyd")
+(version "0.3.6")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://archive.xfce.org/src/apps/;
+  name "/" (version-major+minor version) "/"
+  name "-" version ".tar.bz2"))
+  (sha256
+   (base32
+"1ybcfqfynr33g5hp2lgq17s8qyx7rq6fd2iwrpwcvm6kml6prjpl"
+(build-system gnu-build-system)
+(arguments
+ `(#:configure-flags
+   (list (string-append "--prefix=" %output
+(native-inputs
+ `(("intltool" ,intltool)
+   ("pkg-config" ,pkg-config)))
+(propagated-inputs
+ `(("glib:bin" ,glib "bin&quo

Re: [PATCH] DRAFT: gnu: icecat: Update to 52.0.2-gnu1; add fixes from ESR 52.1.

2017-04-20 Thread Petter

Hi Mark,

I've been running Icecat 52 for a couple of hours now on Xfce. No 
problems!


Memory and CPU usage is normal.

Well done, thanks!
Petter



Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Thanks Leo!

On 2017-04-17 20:18, Leo Famulari wrote:

On Mon, Apr 17, 2017 at 07:55:35PM +0200, Petter wrote:

Hi Leo,

Good point! As the build succeeded I didn't think any of it. This 
could be

important for other architectures than what Sergei and I are using.

However,
> find /tmp/go/src/cmd/ -name '*asm\.c*'
doesn't return any file. Looks like they've removed these files. I'm 
pretty
sure they're working to "free" their source of C code, so I wouldn't 
expect

these files to reappear in a later release either.


Indeed, I must have been looking at an old version of the Go source
tree.

With this information I think it's safe to remove the asm.c 
substitution.


Yup! I pushed the update as c04ef86e8114225f5e5859f379582ba6f69aacfb.




Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Hi Leo,

Good point! As the build succeeded I didn't think any of it. This could 
be important for other architectures than what Sergei and I are using.


However,

find /tmp/go/src/cmd/ -name '*asm\.c*'
doesn't return any file. Looks like they've removed these files. I'm 
pretty sure they're working to "free" their source of C code, so I 
wouldn't expect these files to reappear in a later release either.


With this information I think it's safe to remove the asm.c 
substitution.


Best,
Petter

On 2017-04-17 19:18, Leo Famulari wrote:

On Mon, Apr 17, 2017 at 03:37:49PM +0200, Petter wrote:

Hi Sergei,

I definitely think your fix deserves recognition. Without it I would
certainly have been unable to build 1.8(.1)? this month. While editing 
the
recipe is trivial mechanical wise, figuring out what to change was not 
:)


Sorry to hear about your issues; I'm on x86_64 and Linux as well 
though...


> $ /gnu/store/b4gflqj64yvksq7959r6m22mf9lzdy69-go-1.8.1/bin/go version
> go version go1.8.1 linux/amd64

Hope you'll be able to work this out!

Thanks for fixing Go 1.8 :)


Yes, thanks to both of you for picking this up :)

@@ -300,8 +301,8 @@ sequential processes (CSP) concurrent programming 
features added.")
(("/etc/services") (string-append net-base 
"/etc/services")))

  (substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path))
- (substitute* (find-files "cmd" "asm.c")
-   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
+ (substitute* (find-files "cmd" "\\.go")
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))


The substitution that is removed here would still patch some files.
Shouldn't we adjust the old substitution to also match '/lib64', as 
well

as add the new substitution?

I've attached a patch for that.




Re: [PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Hi Sergei,

I definitely think your fix deserves recognition. Without it I would 
certainly have been unable to build 1.8(.1)? this month. While editing 
the recipe is trivial mechanical wise, figuring out what to change was 
not :)


Sorry to hear about your issues; I'm on x86_64 and Linux as well 
though...



$ /gnu/store/b4gflqj64yvksq7959r6m22mf9lzdy69-go-1.8.1/bin/go version
go version go1.8.1 linux/amd64


Hope you'll be able to work this out!

Thanks for fixing Go 1.8 :)

Best,
Petter

On 2017-04-17 14:54, Sergei Trofimovich wrote:

On Mon, 17 Apr 2017 14:16:06 +0200
Petter <pet...@mykolab.ch> wrote:


Hi,

With this patch I'm not sure how to properly handle Copyright. I've
taken a guess and prepared a
patch anyway.

Here's the situation.

Updating to 1.8 was not trivial. A fix has been posted in a comment by
Sergei Trofimovich on
github[1]. It's a proper Guix patch, updating Go to 1.8, with the fix
and the trivial update stuff,
but as far as I can see not actually submitted to Guix.

[1] https://github.com/golang/go/issues/19132#issuecomment-285897612

After this Go 1.8.1 has been released. The attached patch has the
trivial update stuff for 1.8.1
and the fix by Sergei. I added Sergei to the Copyright section, but 
I'm

not sure if this is
correct, and if this is the way to do it. Also, I didn't find his 
e-mail

address, so I just added
his github page, in ()...

A little messy, please let me know if I should do something 
differently.


I consider the fix itself trivial thus I'm perfectly fine with not 
being

attributed at all. Apologies for making it hard to track me down.
I've added one of emails to github's front page.

[ While the fix is trivial debugging was a bit more fun :) ]

If you still like to add attribution (or have other reasons) feel free
to add "Sergei Trofimovich <sly...@inbox.ru>"

I didn't get to submitting something that works because some unrelated
go-1.8.0 tests failed for me.

go-1.8.1 fails in a similar way, but if it works for you
it's very probable just my environment (x86_64-linux):

guix-master $ ./pre-inst-env guix build go-1.8

  # ../misc/cgo/test
  runtime/cgo: pthread_create failed: Resource temporarily unavailable
  scatter = 0x55ffc0
  hello from C
  sqrt is: 0
  SIGABRT: abort
  PC=0x771232c4 m=12 sigcode=18446744073709551610

Thanks for finishing go update!From ae8434c72d75f68fa25571bee72084a623661a57 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Mon, 17 Apr 2017 15:14:18 +0200
Subject: [PATCH] gnu: go: Update to 1.8.1.

* gnu/packages/golang.scm (go): Update to 1.8.1.
---
 gnu/packages/golang.scm | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 00630ce06..90a809eb2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3,8 +3,9 @@
 ;;; Copyright © 2016 Matthew Jordan <matthewjordandev...@yandex.com>
 ;;; Copyright © 2016 Andy Wingo <wi...@igalia.com>
 ;;; Copyright © 2016 Ludovic Courtès <l...@gnu.org>
-;;; Copyright © 2016 Petter <pet...@mykolab.ch>
+;;; Copyright © 2016, 2017 Petter <pet...@mykolab.ch>
 ;;; Copyright © 2016, 2017 Leo Famulari <l...@famulari.name>
+;;; Copyright © 2017 Sergei Trofimovich <sly...@inbox.ru>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -197,11 +198,11 @@ garbage collection, various safety features and in the style of communicating
 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))
 
-(define-public go-1.7
+(define-public go-1.8
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.7.5")
+(version "1.8.1")
 (source
  (origin
(method url-fetch)
@@ -209,7 +210,7 @@ sequential processes (CSP) concurrent programming features added.")
name version ".src.tar.gz"))
(sha256
 (base32
- "058q57zmi23rflingzhy1b87yl69mb62ql2psfxqr7q7l89lb0sf"
+ "0mqf8ydxdx1pwmrs8p8wl5y1qrplzxmxzgb6vkghy4l67z0g9nik"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -300,8 +301,8 @@ sequential processes (CSP) concurrent programming features added.")
(("/etc/services") (string-append net-base "/etc/services")))
  (substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path))
- (substitute* (find-files "cmd" "asm.c")
-   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
+ (substitute* (find-files "cmd" "\\.go")
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
  #t)))
(add-before 'build 'set-bootstrap-variables
   

[PATCH] gnu: go: Update to 1.8.1

2017-04-17 Thread Petter

Hi,

With this patch I'm not sure how to properly handle Copyright. I've 
taken a guess and prepared a

patch anyway.

Here's the situation.

Updating to 1.8 was not trivial. A fix has been posted in a comment by 
Sergei Trofimovich on
github[1]. It's a proper Guix patch, updating Go to 1.8, with the fix 
and the trivial update stuff,

but as far as I can see not actually submitted to Guix.

[1] https://github.com/golang/go/issues/19132#issuecomment-285897612

After this Go 1.8.1 has been released. The attached patch has the 
trivial update stuff for 1.8.1
and the fix by Sergei. I added Sergei to the Copyright section, but I'm 
not sure if this is
correct, and if this is the way to do it. Also, I didn't find his e-mail 
address, so I just added

his github page, in ()...

A little messy, please let me know if I should do something differently.

Best,
PetterFrom 9b24372fc95ac32e774bbaa1c5219b771fcd1cda Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Mon, 17 Apr 2017 13:36:16 +0200
Subject: [PATCH] gnu: go: Update to 1.8.1.

* gnu/packages/golang.scm (go): Update to 1.8.1.
---
 gnu/packages/golang.scm | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 00630ce06..1864f780a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3,8 +3,9 @@
 ;;; Copyright © 2016 Matthew Jordan <matthewjordandev...@yandex.com>
 ;;; Copyright © 2016 Andy Wingo <wi...@igalia.com>
 ;;; Copyright © 2016 Ludovic Courtès <l...@gnu.org>
-;;; Copyright © 2016 Petter <pet...@mykolab.ch>
+;;; Copyright © 2016, 2017 Petter <pet...@mykolab.ch>
 ;;; Copyright © 2016, 2017 Leo Famulari <l...@famulari.name>
+;;; Copyright © 2017 Sergei Trofimovich (https://github.com/trofi)
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -197,11 +198,11 @@ garbage collection, various safety features and in the style of communicating
 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))
 
-(define-public go-1.7
+(define-public go-1.8
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.7.5")
+(version "1.8.1")
 (source
  (origin
(method url-fetch)
@@ -209,7 +210,7 @@ sequential processes (CSP) concurrent programming features added.")
name version ".src.tar.gz"))
(sha256
 (base32
- "058q57zmi23rflingzhy1b87yl69mb62ql2psfxqr7q7l89lb0sf"
+ "0mqf8ydxdx1pwmrs8p8wl5y1qrplzxmxzgb6vkghy4l67z0g9nik"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -300,8 +301,8 @@ sequential processes (CSP) concurrent programming features added.")
(("/etc/services") (string-append net-base "/etc/services")))
  (substitute* "time/zoneinfo_unix.go"
(("/usr/share/zoneinfo/") tzdata-path))
- (substitute* (find-files "cmd" "asm.c")
-   (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
+ (substitute* (find-files "cmd" "\\.go")
+   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
  #t)))
(add-before 'build 'set-bootstrap-variables
  (lambda* (#:key outputs inputs #:allow-other-keys)
@@ -364,4 +365,4 @@ sequential processes (CSP) concurrent programming features added.")
  `(("go" ,go-1.4)
,@(package-native-inputs go-1.4)
 
-(define-public go go-1.7)
+(define-public go go-1.8)
-- 
2.11.1



Re: gnu: Add syncthing.

2016-12-16 Thread Petter

On 2016-12-16 02:52, Leo Famulari wrote:

On Thu, Dec 15, 2016 at 10:06:59PM +0100, Petter wrote:

Hi again,

I've prefixed most of the packages with "golang-" now. However, there 
are

some
packages already starting with "golang-", f.ex.
"golang-org-x-text-unicode-norm",
and I left those alone. It's inconsistent, but I felt this was 
preferable to

names like "golang-golang-org-x-text-unicode-norm". What do you think?


That's the right way. It fits the package naming guidelines:

https://www.gnu.org/software/guix/manual/html_node/Package-Naming.html


I'm able to interpret your answer both ways, should I make it
"golang-golang-org-x-text-unicode-norm"?


Finally, there's a telemetry configuration in Syncthing. It is opt-in;
but it will ask the user after a few hours if they want to join. The
plan is to disable the question, however I suspect I've messed up the
build system in that area, so this takes some more looking in to.


Personally, I'm fine with the upstream "opt-in" nag warning. It only
shows up when you open the Syncthing web interface; it's not an
intrusive desktop "notification". Once the user has said "yes" or "no",
it doesn't appear again until Syncthing makes a change to what
information they collect.

But, if people think our package should never ask, I don't mind if we
disable the request, as long as we share our changes with the Syncthing
project and they don't notice anything broken.


I'll make an attempt at this while the jury is out, primarily to
retrieve the ability to edit files. (Either I broke it, or I need to
learn how to use (snippet).


Many of my comments below are about tedious things. Let us know if you
are getting sick of working on these packages, and I will help :) This
includes improving the descriptions.


Yes! Help please. The meta-data part is tricky and time consuming, I'd
rather spend my Guix time on the build system than descriptions
etc. Synopsis and descriptions are just stuff i found on their
home-page.


Date: Thu, 15 Dec 2016 21:42:03 +0100
Subject: [PATCH] gnu: Add Syncthing.

* gnu/packages/syncthing.scm: New file.


Cool!


+(define-public syncthing



+(source (origin
+  (method git-fetch)
+  (uri (git-reference
+(url "https://github.com/syncthing/syncthing/;)
+(commit (string-append "v" version
+  (file-name (string-append name "-" version 
"-checkout"))


We should use the Syncthing release tarball:

https://github.com/syncthing/syncthing/releases/download/v0.14.14/syncthing-source-v0.14.14.tar.gz


Totally agree! However, tarballs are currently unsupported... due to,
hm, let's say "because very good reasons noone can be blamed for,
particularly and especially not me".

Ok, I messed up the build system :P Removed too much code
apparently. I'm working on getting this back.


+(arguments
+ `(#:import-path "github.com/syncthing/syncthing"


What do you think about having the go-build-system try to automatically
generate the import-path based on the source URL, with the option for
the packager to set it manually, as shown here?

For many of the packages in this patch (which will eventually be split
into one package per patch ;) ), that auto-generated import-path
could be correct.

I think that an (arguments) field indicates that the package's build
scripts have deviated from the standard. If a Guix build system 
requires

all of its packages to do something in (arguments), the build system
should be extended :)


This is my goal, and I tried to accomplish this initially, because as
you can see for git checkouts most of the time import-path is url
minus scheme://. But I was unable to retrieve the url in the build
phases. So I did it like this instead, to get something that worked;
also something like #:import-path is required where import-path can't
be derived from the url.

I would need concrete help with this, that is getting the url and
perhaps what (method) was used.


+   #:phases
+   (modify-phases %standard-phases
+ (replace 'delete-files
+   (lambda _
+ (delete-file-recursively 
"src/github.com/syncthing/syncthing/vendor")))

+
+ (replace 'build
+   (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion 
"src/github.com/syncthing/syncthing"
+   (zero? (system* "go" "run" "build.go" "install" 
"syncthing" "-no-upgrade")

+
+ (replace 'install
+   (lambda _
+ (copy-recursively 
"src/github.com/syncthing/syncthing/bin/"
+   (string-append (assoc-ref %outputs 
"out") "/bin"))

+ (copy-recursively "pkg"
+ 

Re: gnu: Add Go build system.

2016-12-16 Thread Petter

On 2016-12-16 03:05, Leo Famulari wrote:

On Sun, Dec 11, 2016 at 01:17:48AM +0100, Petter wrote:

+(define* (build #:key import-path #:allow-other-keys)
+  (system* "go" "install" import-path))
+
+(define* (install #:key inputs outputs #:allow-other-keys)
+  (copy-recursively "bin" (string-append (assoc-ref outputs "out") 
"/bin"))
+  (copy-recursively "pkg" (string-append (assoc-ref outputs "out") 
"/pkg"))
+  (copy-recursively "src" (string-append (assoc-ref outputs "out") 
"/src")))


It looks like `go install` knows "where" to install the files, but
installs them in the wrong place, and then we copy them into place in
the install phase. I think it's inefficient to move the files twice.

Can the build phase use something like `go build`, followed by the
install phase using `go install` to move the files directly to the
package's output directory in /gnu/store?


The differences between `go install` and `go build` here is that `go
install` compiles and moves the result to $GOPATH/bin (unless GOBIN is
set to somewhere else).

`go build` compiles (always from source I believe) and leaves the
resulting binary in current directory.

`go install` compiles and also creates package objects in pkg/ which I
believe is a compiled object that is compiled once and then reused,
unless source is changed. Not sure if timestamps are used to determine
whether source has changed, and how that works on Guix.

Optimizations could be made for sure, I will look at this at
convenience.

On 2016-12-16 05:49, Leo Famulari wrote:

On Sun, Dec 11, 2016 at 01:17:48AM +0100, Petter wrote:

From 4c0597a95ae3cd111ef12d675edf501c559458ba Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 11 Dec 2016 01:10:09 +0100
Subject: [PATCH] gnu: Add Go build system.

* guix/build-system/go.scm: New file
* guix/build/go-build-system.scm: New file.


Another question: does this build system try to run tests? In my own
Syncthing packaging I used `go run build.go test`, but I noticed that
your Syncthing package built with this build system doesn't seem to run
the tests.


No. It only builds/installs at the moment. Tests, docs,
cross-compilation and other things (if there are more things), are not
dealt with at this point.

Note that Syncthing uses their own build program (build.go). This is
atypical. There will be a test phase, and Syncthing will override this
with their way of running tests.

Regarding cross-compilation. Go supports: 386, amd64, amd64p32, arm,
arm64, mips64, mips64le, ppc64, ppc64le and s390x as far as I can
tell. With mips32 being added in February. I have yet to discover how
the build system should deal with cross-compilations. The Go part is
easy, just set the GOARCH environment variable before compiling.
`GOARCH=mips64 go install ...`



[PATCH] doc: Mention "guix pull" during installation.

2016-12-16 Thread Petter

Hi,

Some new users don't run `guix pull` before installing, and can have a 
less good experience because of this. Proposing a patch to add this to 
the manual.


Thanks,
PetterFrom 2340158e5454cbb3050840821bf0fd1965d2fe79 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 16 Dec 2016 09:28:32 +0100
Subject: [PATCH] doc: Mention "guix pull" during installation.

* doc/guix.texi (Proceeding with the Installation): Add "guix pull".
---
 doc/guix.texi | 8 
 1 file changed, 8 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 46ed451..cda90ed 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -6863,6 +6863,14 @@ rather than kept in memory.  This is necessary because the first phase of
 the @command{guix system init} command (see below) entails downloads or
 builds to @file{/gnu/store} which, initially, is an in-memory file system.
 
+At this point it is advisable to update the system, especially if the
+installer is more than a few weeks old. Then most, if not all, packages
+will be available as substitutes.
+
+@example
+guix pull
+@end example
+
 Next, you have to edit a file and
 provide the declaration of the operating system to be installed.  To
 that end, the installation system comes with three text editors: GNU nano
-- 
2.10.1



Re: gnu: Add syncthing.

2016-12-15 Thread Petter

Hi again,

I've prefixed most of the packages with "golang-" now. However, there 
are some
packages already starting with "golang-", f.ex. 
"golang-org-x-text-unicode-norm",
and I left those alone. It's inconsistent, but I felt this was 
preferable to

names like "golang-golang-org-x-text-unicode-norm". What do you think?

Also, all the packages have meta-data now: synopsis, description, 
home-page and
license. And the (version) field have been adapted to the Guix 
guidelines.


Also also, a new version of Syncthing with some security fixes was just 
released,

and I've updated the recipe to this version (0.14.14).

Finally, there's a telemetry configuration in Syncthing. It is opt-in; 
but it
will ask the user after a few hours if they want to join. The plan is to 
disable
the question, however I suspect I've messed up the build system in that 
area, so

this takes some more looking in to.

Best,
PetterFrom f6b8324f4200c2dc89967b5f097fc8e28292bd5a Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Thu, 15 Dec 2016 21:42:03 +0100
Subject: [PATCH] gnu: Add Syncthing.

* gnu/packages/syncthing.scm: New file.
---
 gnu/packages/syncthing.scm | 1257 
 1 file changed, 1257 insertions(+)
 create mode 100644 gnu/packages/syncthing.scm

diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
new file mode 100644
index 000..c4da737
--- /dev/null
+++ b/gnu/packages/syncthing.scm
@@ -0,0 +1,1257 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Leo Famulari <l...@famulari.name>
+;;; Copyright © 2016 Petter <pet...@mykolab.ch>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages syncthing)
+  #:use-module (guix build-system go)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages golang))
+
+(define-public syncthing
+  (package
+(name "syncthing")
+(version "0.14.14")
+(source (origin
+  (method git-fetch)
+  (uri (git-reference
+(url "https://github.com/syncthing/syncthing/;)
+(commit (string-append "v" version
+  (file-name (string-append name "-" version "-checkout"))
+  (sha256
+   (base32 "1c9x7j6pbbd3i34nvisw70v2l3llp3dhw5cvd72jgx3gm0j3v31y"
+(build-system go-build-system)
+(inputs
+ `(("github.com/AudriusButkevicius/go-nat-pmp"
+,golang-github-com-audriusbutkevicius-go-nat-pmp)
+   ("github.com/vitrun/qart/coding" ,golang-github-com-vitrun-qart-coding)
+   ("github.com/vitrun/qart/gf256" ,golang-github-com-vitrun-qart-gf256)
+   ("github.com/vitrun/qart/qr" ,golang-github-com-vitrun-qart-qr)
+   ("github.com/thejerf/suture" ,golang-github-com-thejerf-suture)
+   ("github.com/syndtr/goleveldb" ,golang-github-com-syndtr-goleveldb)
+   ("github.com/sasha-s/go-deadlock" ,golang-github-com-sasha-s-go-deadlock)
+   ("github.com/rcrowley/go-metrics" ,golang-github-com-rcrowley-go-metrics)
+   ("github.com/minio/sha256-simd" ,golang-github-com-minio-sha256-simd)
+   ("github.com/kardianos/osext" ,golang-github-com-kardianos-osext)
+   ("github.com/juju/ratelimit" ,golang-github-com-juju-ratelimit)
+   ("github.com/jackpal/gateway" ,golang-github-com-jackpal-gateway)
+   ("github.com/gogo/protobuf" ,golang-github-com-gogo-protobuf)
+   ("github.com/gobwas/glob" ,golang-github-com-gobwas-glob)
+   ("github.com/calmh/xdr" ,golang-github-com-calmh-xdr)
+   ("github.com/calmh/luhn" ,golang-github-com-calmh-luhn)
+   ("github.com/calmh/du" ,golang-github-com-calmh-du)
+   ("github.com/bkaradzic/go-lz4" ,golang-github-com-bkaradzic-go-lz4)
+   ("github.com/golang/snappy" ,golang-github-com-golang-snappy)
+   ("golang.org/x/crypto/bcrypt" ,golang-org-x-crypto-bcrypt)
+   ("golang.org/x/crypto/blowf

gnu: Add syncthing.

2016-12-10 Thread Petter

Hi,

Syncthing is the first project to use the recently added Go build
system. It's in a minimal state to aid in developing the build system
and because it's a considerable job to add descriptions, synopsises
and homepages to all these packages (55). Licenses are probably
incorrect, unless correct by coincidence. Help with this would be most
appreciated!

Tar archives are currently unsupported.

Best,
PetterFrom f195168e04fd31bc0c72c279ff3b96a272fe8183 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 11 Dec 2016 01:33:59 +0100
Subject: [PATCH] gnu: Add syncthing.

* gnu/packages/syncthing.scm: New file.
---
 gnu/packages/syncthing.scm | 1242 
 1 file changed, 1242 insertions(+)
 create mode 100644 gnu/packages/syncthing.scm

diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
new file mode 100644
index 000..74847f0
--- /dev/null
+++ b/gnu/packages/syncthing.scm
@@ -0,0 +1,1242 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Leo Famulari <l...@famulari.name>
+;;; Copyright © 2016 Petter <pet...@mykolab.ch>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages syncthing)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages golang))
+
+(define-public syncthing
+  (package
+(name "syncthing")
+(version "0.14.13")
+(source (origin
+  (method git-fetch)
+  (uri (git-reference
+(url "https://github.com/syncthing/syncthing/;)
+(commit (string-append "v" version
+  (file-name (string-append name "-" version "-checkout"))
+  (sha256
+   (base32 "0gq218f1rhzjrqh2gjyvqksa7a1agwhm8rfqf5jw58pncblrn6v4"
+(build-system go-build-system)
+(inputs
+ `(("github.com/AudriusButkevicius/go-nat-pmp"
+,github-com-audriusbutkevicius-go-nat-pmp)
+   ("github.com/vitrun/qart/coding" ,github-com-vitrun-qart-coding)
+   ("github.com/vitrun/qart/gf256" ,github-com-vitrun-qart-gf256)
+   ("github.com/vitrun/qart/qr" ,github-com-vitrun-qart-qr)
+   ("github.com/thejerf/suture" ,github-com-thejerf-suture)
+   ("github.com/syndtr/goleveldb" ,github-com-syndtr-goleveldb)
+   ("github.com/sasha-s/go-deadlock" ,github-com-sasha-s-go-deadlock)
+   ("github.com/rcrowley/go-metrics" ,github-com-rcrowley-go-metrics)
+   ("github.com/minio/sha256-simd" ,github-com-minio-sha256-simd)
+   ("github.com/kardianos/osext" ,github-com-kardianos-osext)
+   ("github.com/juju/ratelimit" ,github-com-juju-ratelimit)
+   ("github.com/jackpal/gateway" ,github-com-jackpal-gateway)
+   ("github.com/gogo/protobuf" ,github-com-gogo-protobuf)
+   ("github.com/gobwas/glob" ,github-com-gobwas-glob)
+   ("github.com/calmh/xdr" ,github-com-calmh-xdr)
+   ("github.com/calmh/luhn" ,github-com-calmh-luhn)
+   ("github.com/calmh/du" ,github-com-calmh-du)
+   ("github.com/bkaradzic/go-lz4" ,github-com-bkaradzic-go-lz4)
+   ("github.com/golang/snappy" ,github-com-golang-snappy)
+   ("golang.org/x/crypto/bcrypt" ,golang-org-x-crypto-bcrypt)
+   ("golang.org/x/crypto/blowfish" ,golang-org-x-crypto-blowfish)
+   ("golang.org/x/text/transform" ,golang-org-x-text-transform)
+   ("golang.org/x/text/unicode/norm" ,golang-org-x-text-unicode-norm)
+   ("golang.org/x/net/proxy" ,golang-org-x-net-proxy)
+   ("golang.org/x/net/bpf" ,golang-org-x-net-bpf)
+   ("golang.org/x/net/ipv6" ,golang-org-x-net-ipv6)
+   ("golang.org/x/net/internal/iana" ,golang-org-x-net-internal-iana)
+   ("golang.org/x/net/internal/netreflect"
+,golang-org-x-net-internal-netreflect)))
+
+(arguments
+ `(#:i

gnu: Add Go build system.

2016-12-10 Thread Petter

Hi,

I've made an attempt at making a build system for Go. It seems to
work, but it's not pretty. My Guix/Guile skills are bad, so keep your
expectations to a minimum. Consider it something where there was
nothing.

I started with a copy of the GNU build system, removed code I felt
wasn't necessary, then adapted to Go's needs. Note, comments and those
first text string after a (define) have not been updated. Unnecessary
#:use-modules have not been removed. In short, it's bad and there's a
lot to do make it ok-ish. That's where you come in :)

I'll add Syncthing, a sizeable Go project, and its dependencies in a
later e-mail. These recipes uses this Go build system, and my primary
goal has been to make these nice, while functional. Now we can
hopefully work on the build system with a minimum of modifications to
the recipes.


Happy hacking!
PetterFrom 4c0597a95ae3cd111ef12d675edf501c559458ba Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 11 Dec 2016 01:10:09 +0100
Subject: [PATCH] gnu: Add Go build system.

* guix/build-system/go.scm: New file
* guix/build/go-build-system.scm: New file.
---
 guix/build-system/go.scm   | 193 +
 guix/build/go-build-system.scm | 186 +++
 2 files changed, 379 insertions(+)
 create mode 100644 guix/build-system/go.scm
 create mode 100644 guix/build/go-build-system.scm

diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
new file mode 100644
index 000..f336f20
--- /dev/null
+++ b/guix/build-system/go.scm
@@ -0,0 +1,193 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Petter <pet...@mykolab.ch>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system go)
+  #:use-module (guix store)
+  #:use-module (guix utils)
+  #:use-module (guix combinators)
+  #:use-module (guix derivations)
+  #:use-module (guix search-paths)
+  #:use-module (guix build-system)
+  #:use-module (guix packages)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages golang)
+  #:use-module (srfi srfi-1)
+  #:use-module (ice-9 match)
+  #:export (%go-build-system-modules
+go-build
+go-build-system
+sourcestuff
+standard-packages))
+
+;; Commentary:
+;;
+;; Standard build procedure for packages using the GNU Build System or
+;; something compatible ("./configure && make && make install").
+;;
+;; Code:
+
+(define %go-build-system-modules
+  ;; Build-side modules imported and used by default.
+  '((guix build go-build-system)
+(guix build utils)
+(guix build gremlin)
+(guix elf)))
+
+(define %default-modules
+  ;; Modules in scope in the build-side environment.
+  '((guix build go-build-system)
+(guix build utils)))
+
+(define* (lower name
+#:key source inputs native-inputs outputs target
+(implicit-inputs? #t) (implicit-cross-inputs? #t)
+(strip-binaries? #t) system
+#:allow-other-keys
+#:rest arguments)
+  "Return a bag for NAME from the given arguments."
+  (define private-keywords
+`(#:source #:inputs #:native-inputs #:outputs
+  #:implicit-inputs? #:implicit-cross-inputs?
+  ,@(if target '() '(#:target
+
+  (bag
+(name name)
+(system system) (target target)
+(build-inputs `(,@(if source
+  `(("source" ,source)))
+("go" ,go)
+,@native-inputs))
+(host-inputs inputs)
+
+(build (if target gnu-cross-build go-build))
+(arguments (strip-keyword-arguments private-keywords arguments
+
+(define* (go-build store name input-drvs
+#:key (guile #f)
+(outputs '("out"))
+(search-paths '())
+(configure-flags ''())
+(make-flags ''())
+(out-of-source? #f)
+(tests? #t)
+(import-path "")
+(unpack-path "")
+(test-target "check")
+(parallel-build? #t)
+(parallel-tests? #t)
+(

Re: [PATCH] gnu: Remove redundancy where mkdir-p is followed by install-file .

2016-11-21 Thread Petter

Hi,

Leo: Aha, yes you are right. I copy+pasted, and didn't realize those 
[source]

bits referred to fields in a recipe... Now I do, thanks! :)

Sure, I bring to you, two patches this time. One for master, and one for
core-updates. Not sure how to name the patch files properly, so I just 
put

branch name at the end.

Ludo: I like nitpicking ;)

I checked the packages with `guix refresh -l`, output below:

No dependents other than itself: eigensoft-6.1.2-1.b14d1e202
No dependents other than itself: snap-aligner-1.0beta.18
No dependents other than itself: pardre-1.1.5
No dependents other than itself: piranha-1.2.1-1.0466d364b
No dependents other than itself: hypre-2.11.0
No dependents other than itself: mpc123-0.2.4
No dependents other than itself: tuxguitar-1.3.2
No dependents other than itself: impressive-0.11.1

$ guix refresh -l bwa@0.7.12
  A single dependent package: bamm-1.7.3

$ guix refresh -l qemu@2.7.0
  Building the following 2 packages would ensure 5 dependent packages 
are

  rebuilt: virt-manager-1.4.0 python-libvirt-2.0.0



Let me know if there are any more issues.


Best,
Petter

On 2016-11-20 18:05, Leo Famulari wrote:

On Sun, Nov 20, 2016 at 04:28:29PM +0100, Petter wrote:

From 595d438789c7c9a293ae7fac500ace7422073624 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 20 Nov 2016 13:39:13 +0100
Subject: [PATCH] gnu: Remove redundancy where mkdir-p  is 
followed by

 install-file  .

* gnu/packages/bioinformatics.scm (bwa)[source]: Remove redundant 
mkdir-p.

* gnu/packages/bioinformatics.scm (eigensoft)[source]: Likewise.
* gnu/packages/bioinformatics.scm (snap-aligner)[source]: Likewise.
* gnu/packages/bioinformatics.scm (pardre)[source]: Likewise.
* gnu/packages/bioinformatics.scm (piranha)[source]: Likewise.
* gnu/packages/maths.scm (hypre)[source]: Likewise.
* gnu/packages/mp3.scm (mpc123)[source]: Likewise.
* gnu/packages/music.scm (tuxguitar)[source]: Likewise.
* gnu/packages/pdf.scm (impressive)[source]: Likewise.
* gnu/packages/qemu.scm (qemu)[source]: Likewise.
* gnu/packages/tls.scm (openssl)[source]: Likewise.


Thanks! A few requests...

First, I think that most, if not all, of these changes are not in the
[source] field of the changed package definitions. I bet that they are
all in the [arguments] field. Can you send a revised patch with an
updated commit message?

Second, we can't change the OpenSSL package on the master branch,
because many things depend on it:

$ guix refresh -l openssl@1.0.2
Building the following 1090 packages would ensure 2981 dependent
packages are rebuilt
[...]

We do non-security related changes to that sort of "core" package on 
the

core-updates branch, which is merged into master every couple months.
Otherwise, we'd be rebuilding everything constantly, and users would be
unhappy.

So, will you submit a separate patch for the OpenSSL change? Make sure
it applies cleanly to the core-updates branch. You don't need to try
building this; it will take forever, as you noticed.From f0b2abe1fcbfcd16f2e6a6165f985dd9dd7dcff2 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Mon, 21 Nov 2016 19:18:55 +0100
Subject: [PATCH] gnu: Remove redundancy where mkdir-p  is followed by  
 install-file  .

* gnu/packages/bioinformatics.scm (bwa)[arguments]: Remove redundant mkdir-p.
(eigensoft)[arguments]: Likewise.
(snap-aligner)[arguments]: Likewise.
(pardre)[arguments]: Likewise.
(piranha)[arguments]: Likewise.
* gnu/packages/maths.scm (hypre)[arguments]: Likewise.
* gnu/packages/mp3.scm (mpc123)[arguments]: Likewise.
* gnu/packages/music.scm (tuxguitar)[arguments]: Likewise.
* gnu/packages/pdf.scm (impressive)[arguments]: Likewise.
* gnu/packages/qemu.scm (qemu)[arguments]: Likewise.
---
 gnu/packages/bioinformatics.scm | 7 ---
 gnu/packages/maths.scm  | 1 -
 gnu/packages/mp3.scm| 1 -
 gnu/packages/music.scm  | 1 -
 gnu/packages/pdf.scm| 1 -
 gnu/packages/qemu.scm   | 1 -
 6 files changed, 12 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 64c7bba..97d3e48 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1261,9 +1261,6 @@ splice junctions between exons.")
   (assoc-ref outputs "out") "/share/doc/bwa"))
 (man (string-append
   (assoc-ref outputs "out") "/share/man/man1")))
-(mkdir-p bin)
-(mkdir-p doc)
-(mkdir-p man)
 (install-file "bwa" bin)
 (install-file "README.md" doc)
 (install-file "bwa.1" man)))
@@ -2155,7 +2152,6 @@ of nucleic acid binding proteins.")
  (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
   (bin  (string-append out "/bin")))
-

[PATCH] gnu: Remove redundancy where mkdir-p is followed by install-file .

2016-11-20 Thread Petter

Forgot the patch in the initial message :/From 595d438789c7c9a293ae7fac500ace7422073624 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Sun, 20 Nov 2016 13:39:13 +0100
Subject: [PATCH] gnu: Remove redundancy where mkdir-p  is followed by
 install-file  .

* gnu/packages/bioinformatics.scm (bwa)[source]: Remove redundant mkdir-p.
* gnu/packages/bioinformatics.scm (eigensoft)[source]: Likewise.
* gnu/packages/bioinformatics.scm (snap-aligner)[source]: Likewise.
* gnu/packages/bioinformatics.scm (pardre)[source]: Likewise.
* gnu/packages/bioinformatics.scm (piranha)[source]: Likewise.
* gnu/packages/maths.scm (hypre)[source]: Likewise.
* gnu/packages/mp3.scm (mpc123)[source]: Likewise.
* gnu/packages/music.scm (tuxguitar)[source]: Likewise.
* gnu/packages/pdf.scm (impressive)[source]: Likewise.
* gnu/packages/qemu.scm (qemu)[source]: Likewise.
* gnu/packages/tls.scm (openssl)[source]: Likewise.
---
 gnu/packages/bioinformatics.scm | 7 ---
 gnu/packages/maths.scm  | 1 -
 gnu/packages/mp3.scm| 1 -
 gnu/packages/music.scm  | 1 -
 gnu/packages/pdf.scm| 1 -
 gnu/packages/qemu.scm   | 1 -
 gnu/packages/tls.scm| 1 -
 7 files changed, 13 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 64c7bba..97d3e48 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1261,9 +1261,6 @@ splice junctions between exons.")
   (assoc-ref outputs "out") "/share/doc/bwa"))
 (man (string-append
   (assoc-ref outputs "out") "/share/man/man1")))
-(mkdir-p bin)
-(mkdir-p doc)
-(mkdir-p man)
 (install-file "bwa" bin)
 (install-file "README.md" doc)
 (install-file "bwa.1" man)))
@@ -2155,7 +2152,6 @@ of nucleic acid binding proteins.")
  (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
   (bin  (string-append out "/bin")))
- (mkdir-p bin)
  (for-each (lambda (file)
  (install-file file bin))
(find-files "../bin" ".*"))
@@ -4834,7 +4830,6 @@ optionally compressed by gzip.")
(lambda* (#:key outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
 (bin (string-append out "/bin")))
-   (mkdir-p bin)
(install-file "snap-aligner" bin)
(install-file "SNAPCommand" bin)
#t))
@@ -5694,7 +5689,6 @@ Needleman-Wunsch).")
  (replace 'install
(lambda* (#:key outputs #:allow-other-keys)
  (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
-   (mkdir-p bin)
(install-file "ParDRe" bin)
#t))
 (inputs
@@ -7572,7 +7566,6 @@ intervals (e.g. genes, sequence alignments).")
  (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
   (bin (string-append out "/bin")))
- (mkdir-p bin)
  (for-each (lambda (file)
  (install-file file bin))
(find-files "bin" ".*")))
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a1bd784..0c51f6d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2723,7 +2723,6 @@ set.")
  ;; Custom install because docs/Makefile doesn't honor ${docdir}.
  (let* ((doc (assoc-ref outputs "doc"))
 (docdir (string-append doc "/share/doc/hypre-" ,version)))
-   (mkdir-p docdir)
(with-directory-excursion "docs"
  (for-each (lambda (base)
  (install-file (string-append base ".pdf") docdir)
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index ceef896..7f0099e 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -441,7 +441,6 @@ format.")
(lambda* (#:key outputs #:allow-other-keys)
  (let* ((out (assoc-ref outputs "out"))
 (bin (string-append out "/bin")))
-   (mkdir-p bin)
(install-file "mpc123" bin)
#:tests? #f))
 (native-inputs
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 4ec6d6e..1a2a33f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1216,7 +1216,6 @@ is subjective.")
 (lib   (string

[PATCH] gnu: Remove redundancy where mkdir-p is followed by install-file .

2016-11-20 Thread Petter

Hi.

Following up on an encouragement by Leo to remove a redundancy in the 
package

recipes.

In several places (mkdir-p) is used right before (install-file), to the 
same

directory. However, (install-file) does (mkdir-p) itself, which makes an
explicit (mkdir-p) redundant.


For reference:

=== guix/build/utils.scm ===
(define (install-file file directory)
  "Create DIRECTORY if it does not exist and copy FILE in there under 
the same

name."
  (mkdir-p directory)
  (copy-file file (string-append directory "/" (basename file



I assume the (mkdir-p)s here could be removed as well.

=== gnu/packages/bioinformatics.scm ===
(mkdir-p lib)
(mkdir-p include)
(for-each (cut install-file <> lib)
  (find-files "." "\\.o$"))
(for-each (cut install-file <> include)
  (find-files "." "\\.hpp$")))


And this (mkdir-p).

=== gnu/packages/ocaml.scm ===
 (mkdir-p doc)
 ;; This file needs write-permissions, because it's
 ;; overwritten by 'docs' during documentation 
generation.

 (chmod "src/strings.ml" #o600)
 (and (zero? (system* "make" "docs"
  "TEXDIRECTIVES=draftfalse"))
  (begin
(for-each (lambda (f)
(install-file f doc))


I did not include them because they're not trivial (to me).



I have not build all the affected packages! It's all a little too much.
Hopefully, someone about to compile these packages can include this 
patch first.



Also, I'm inexperienced with this, so please be extra alert.


Best,
Petter


P.S. If it's of interest to anyone. I used this sed script to locate 
areas with

a possible redundant (mkdir-p):

sed -n '/mkdir-p/{ h; :a; //!{n; H; ba;}; x; /install-file/{F; p;}; 
};'

gnu/packages/*.scm



Re: [PATCH] Added package xcalib

2016-11-19 Thread Petter



On 2016-11-18 21:10, Leo Famulari wrote:

On Wed, Nov 16, 2016 at 01:37:04AM +0100, Petter wrote:
I have worked through the issues you brought up, and it should at 
least be

better now. Maybe even good.


It was already good, now it's very good :)


There is no indication of GPL v2 or later in the project though.


Okay.

Pushed as 01278f16a9b with the following two changes:


+  (replace 'install
+(lambda* (#:key outputs #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+(mkdir-p bin)
+(install-file "xcalib" bin


(install-file) does (mkdir-p) itself, so I removed the redundant
(mkdir-p). It's defined in (guix build utils) if you are interested to
see.


Ok. I looked it up in another package, and copied the approach. (I see 
this redundancy occurs in several other places.)





+  (add-after 'install 'install-doc
+(lambda* (#:key outputs #:allow-other-keys)
+  (let ((doc (string-append(assoc-ref outputs 
"out")

+   "/share/doc/")))

  ^
I added "xcalib" to the end of the path here -|

So, when a user installs xcalib into their profile, the README will be
at ~/.guix-profile/share/doc/xcalib/README, instead of
~/.guix-profile/share/doc/README.


Aha. So that's how it will be used :)

Thanks for doing the final touches! And I really appreciate your 
detailed explanations! The next patch should hopefully be less of a 
burden on you reviewers :)





Re: [PATCH] Added package xcalib

2016-11-15 Thread Petter

Hi Leo,

Thanks for reviewing this patch and helping me do this right!

I have worked through the issues you brought up, and it should at least 
be

better now. Maybe even good.

There is no indication of GPL v2 or later in the project though.

Best,
Petter

On 2016-11-15 20:35, Leo Famulari wrote:

On Mon, Nov 14, 2016 at 05:05:55PM +0100, Petter wrote:

Hi,

I just made a recipe for xcalib, with help from iyzsong. This is the 
first
time I've created one so please be extra alert while reviewing, and 
don't

hesitate to inform me of mistakes.


Thanks Petter and iyzsong!

I think the package should go in the (gnu packages xdisorg) module
instead of its own module.


From 00ca66ec205baf52dc340faa61fd8ac38122e273 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Mon, 14 Nov 2016 16:56:33 +0100
Subject: [PATCH] Added package xcalib


The commit title should be "gnu: Add xcalib.".

Also, please add a "changelog" line describing the code changes. In 
this

case, it should be:

* gnu/packages/xdisorg (xcalib): New variable.

This is the GNU convention, and we mention it in the manual, section 
8.5
Submitting Patches [0]. Please refer to earlier Git commits or ask for 
help

on IRC if you are unsure about it.

[0]
https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html


+(define-public xcalib
+  (package
+(name "xcalib")
+(version "0.8")
+(source (origin
+  (method url-fetch)
+  (uri (string-append 
"http://downloads.sourceforge.net/xcalib/;
+  "xcalib-source-" version 
".tar.gz"))


We have a SourceForge "mirror" URL that should be used. Grep for
'mirror://sourceforge' in gnu/packages for some examples of how to use
it.


+(arguments
+ '(#:make-flags '("CC=gcc")
+   #:phases (modify-phases %standard-phases
+  (delete 'configure)
+  (delete 'check)


Please add a comment explaining why we skip the tests. If there is no
test suite, just use "No test suite". Also, we prefer to skip tests by
setting #:tests? #f instead of deleting the check phase.


+  (replace 'install
+(lambda* (#:key outputs #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+(mkdir-p bin)
+(install-file "xcalib" bin)))


Okay. Please check if there is any documentation that could also be
installed. You can add a build phase before 'install that just fails:
(lambda _ #f), build with --keep-failed, and then look in the build
directory for man pages, READMEs, Info pages, etc.


+(license gpl2)))


Please double-check if the source files contain the "or later" text in
the license headers. If so, it's gpl2+.From 9deb4d7360af358a5ef9e280b443b3df8f85143a Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Wed, 16 Nov 2016 01:14:36 +0100
Subject: [PATCH] gnu: Add xcalib.

* gnu/packages/xdisorg (xcalib): New variable.
---
 gnu/packages/xdisorg.scm | 42 ++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index a26c716..faf1a4d 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Leo Famulari <l...@famulari.name>
 ;;; Copyright © 2016 Alex Kost <alez...@gmail.com>
 ;;; Copyright © 2016 Marius Bakke <mba...@fastmail.com>
+;;; Copyright © 2016 Petter <pet...@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1062,3 +1063,44 @@ XCB util-xrm module provides the following libraries:
 
 - xrm: utility functions for the X resource manager.")
 (license license:x11)))
+
+(define-public xcalib
+  (package
+(name "xcalib")
+(version "0.8")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "mirror://sourceforge/xcalib/xcalib/" version
+  "/xcalib-source-" version ".tar.gz"))
+  (sha256
+   (base32
+"1rh6xb51c5xz926dnn82a2fn643g0sr4a8z66rn6yi7523kjw4ca"
+(build-system gnu-build-system)
+(arguments
+ '(#:make-flags '("CC=gcc")
+   #:tests? #f   ; No test suite
+   #:phases (modify-phases %standard-phases
+  (delete 'configure)
+  (replace 'install
+(lambda* (#:key outputs #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+(mkdir-p bin)
+(install-file &

[PATCH] Added package xcalib

2016-11-14 Thread Petter

Hi,

I just made a recipe for xcalib, with help from iyzsong. This is the 
first time I've created one so please be extra alert while reviewing, 
and don't hesitate to inform me of mistakes.


Best,
PetterFrom 00ca66ec205baf52dc340faa61fd8ac38122e273 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Mon, 14 Nov 2016 16:56:33 +0100
Subject: [PATCH] Added package xcalib

---
 gnu/packages/xcalib.scm | 57 +
 1 file changed, 57 insertions(+)
 create mode 100644 gnu/packages/xcalib.scm

diff --git a/gnu/packages/xcalib.scm b/gnu/packages/xcalib.scm
new file mode 100644
index 000..49f9a3f
--- /dev/null
+++ b/gnu/packages/xcalib.scm
@@ -0,0 +1,57 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Petter <pet...@mykolab.ch>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages xcalib)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses)
+  #:use-module (gnu packages xorg))
+
+(define-public xcalib
+  (package
+(name "xcalib")
+(version "0.8")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "http://downloads.sourceforge.net/xcalib/;
+  "xcalib-source-" version ".tar.gz"))
+  (sha256
+   (base32
+"1rh6xb51c5xz926dnn82a2fn643g0sr4a8z66rn6yi7523kjw4ca"
+(build-system gnu-build-system)
+(arguments
+ '(#:make-flags '("CC=gcc")
+   #:phases (modify-phases %standard-phases
+  (delete 'configure)
+  (delete 'check)
+  (replace 'install
+(lambda* (#:key outputs #:allow-other-keys)
+  (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+(mkdir-p bin)
+(install-file "xcalib" bin)))
+(inputs `(("libx11", libx11)
+  ("libxext", libxext)
+  ("libxxf86vm", libxxf86vm)))
+(synopsis "Monitor calibration loader")
+(description "Tiny monitor calibration loader for XFree86(or X.org)
+and MS-Windows.  Alter brightness, contrast and colors on your monitor.
+Even inverting all the colors, which is nice for low-light conditions.")
+(home-page "http://xcalib.sourceforge.net/;)
+(license gpl2)))
-- 
2.10.1



Re: [PATCH 1/1] Go: Update to 1.7

2016-08-20 Thread Petter

On 2016-08-20 02:07, Leo Famulari wrote:

On Wed, Aug 17, 2016 at 10:54:36AM -0500, Alex Griffin wrote:

Thanks for contributing! Your changes work for me, but it looks like
your mail client mangled the formatting of your patch. So I produced a
good patch with your changes, and added a copyright line and commit
message for you. Hopefully that will make it easier for someone with
commit access to look it over.

--
Alex Griffin



From f2f28e088f2a3f833251c2b31de7e6f531bcdf9a Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Wed, 17 Aug 2016 10:27:04 -0500
Subject: [PATCH] gnu: go: Update to 1.7.

* gnu/packages/golang.scm (go-1.6): Update to 1.7, with corresponding
  minor changes to prebuild phase, and rename variable to...
  (go-1.7): ...this new variable.
  (go): Inherit from new "go-1.7".


I have a working Syncthing [0] on x86_64 with this patch.



Good, my testing on a couple of small programs have been successful as 
well.



I noticed this during the test suite:

# ../misc/cgo/testsanitizers
skipping msan tests: -fsanitize=memory not supported
gcc: error: -fsanitize=thread linking must be done with -pie or -shared
skipping tsan tests: -fsanitizer=thread build failed

I don't know whether or not that's a problem.



Good catch, I did not notice this.

It could be an error by the Go team, ref:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703230

I don't know though if it would be correct for us in that case to add 
-fPIC to this call if that would solve it.



[0] WIP branch:
https://github.com/lfam/guix/commits/contrib-syncthing


 ;;; Copyright ?? 2016 Matthew Jordan <matthewjordandev...@yandex.com>
 ;;; Copyright ?? 2016 Andy Wingo <wi...@igalia.com>
 ;;; Copyright ?? 2016 Ludovic Court??s <l...@gnu.org>
+;;; Copyright ?? 2016 Petter <pet...@mykolab.ch>


Petter, I noticed your original patch did not add a line like this.
Please confirm the name and email address you'd prefer to use.
Pseudoynms are fine.


Alex got it right, this is the name and e-mail address I want to use.



Re: [PATCH 1/1] Go: Update to 1.7

2016-08-17 Thread Petter

Hi Alex,

Great, thank you!


On 2016-08-17 17:54, Alex Griffin wrote:

On Wed, Aug 17, 2016, at 04:34 AM, Petter wrote:

Hi,

Made an attempt to update my first package.

Hope it's good!


Hi Petter,

Thanks for contributing! Your changes work for me, but it looks like
your mail client mangled the formatting of your patch. So I produced a
good patch with your changes, and added a copyright line and commit
message for you. Hopefully that will make it easier for someone with
commit access to look it over.




[PATCH 1/1] Go: Update to 1.7

2016-08-17 Thread Petter

Hi,

Made an attempt to update my first package.

Hope it's good!


---
 gnu/packages/golang.scm | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 09d962d..6e15cf6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -185,11 +185,11 @@ garbage collection, various safety features and in 
the style of communicating

 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))

-(define-public go-1.6
+(define-public go-1.7
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.6.3")
+(version "1.7")
 (source
  (origin
(method url-fetch)
@@ -197,7 +197,7 @@ sequential processes (CSP) concurrent programming 
features added.")

name version ".src.tar.gz"))
(sha256
 (base32
- "002v6irgfd63zp9iza8nski5by0lar033j3ddpqiikw6bznsw9k3"
+ "1h712yd5wk5mrj2dixc9z2xlgksfks00yvglrkrgr488p8b0qs3j"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -216,11 +216,14 @@ sequential processes (CSP) concurrent programming 
features added.")
  ;; Removing net/ tests, which fail when attempting to 
access
  ;; network resources not present in the build 
container.

  (for-each delete-file
-   '("net/listen_test.go" "net/parse_test.go"))
+   '("net/listen_test.go"
+ "net/parse_test.go"
+ "net/cgo_unix_test.go"))

  (substitute* "os/os_test.go"
(("/usr/bin") (getcwd))
-   (("/bin/pwd") (which "pwd")))
+   (("/bin/pwd") (which "pwd"))
+   (("/bin/sh") (which "sh")))

  ;; Add libgcc to runpath
  (substitute* "cmd/link/internal/ld/lib.go"
@@ -275,7 +278,7 @@ sequential processes (CSP) concurrent programming 
features added.")


  ;; fix shebang for testar script
  ;; note the target script is generated at build time.
- (substitute* "../misc/cgo/testcarchive/test.bash"
+ (substitute* 
"../misc/cgo/testcarchive/carchive_test.go"
(("#!/usr/bin/env") (string-append "#!" (which 
"env"


  (substitute* "net/lookup_unix.go"
@@ -336,4 +339,4 @@ sequential processes (CSP) concurrent programming 
features added.")

  `(("go" ,go-1.4)
,@(package-native-inputs go-1.4)

-(define-public go go-1.6)
+(define-public go go-1.7)
--
2.9.3





[PATCH]: Update GRUB menu entry to say (beta) instead of (alpha)

2016-03-03 Thread Petter

Hi,

Current menu entry in GRUB:

GNU with Linux-Libre 4.4.3 (alpha)


Patched:

GNU with Linux-Libre 4.4.3 (beta)



Beta! :)
PetterFrom 856ecb2a41e7a39faeca1323f068e792fbdc16ff Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Thu, 3 Mar 2016 10:47:39 +0100
Subject: [PATCH] Updated GRUB menu entry to say (beta) instead of (alpha)

---
 gnu/system.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index d600d3a..c5dc72e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -702,7 +702,7 @@ listed in OS.  The C library expects to find it under
   (string-append "GNU with "
  (string-titlecase (package-name kernel)) " "
  (package-version kernel)
- " (alpha)"))
+ " (beta)"))
 
 (define (store-file-system file-systems)
   "Return the file system object among FILE-SYSTEMS that contains the store."
-- 
2.6.3



Re: Review of installation manual draft

2016-02-10 Thread Petter

Hi Ludo,

Thanks for looking at it.

On 2016-02-10 22:16, l...@gnu.org wrote:

Hi Petter,

Thanks a lot for the additions to the manual!

There was a lot more than I expected.  ;-)  For now, I’ve focused on 
the

improvements to the “System Installation” section, leading to commit
dedb8d5.

It turned out to be more work than I expected because I had to find out
what the differences were (some paragraphs had been moved to a single
line, which made it hard to spot the differences), and then ended up
doing a few things differently to preserve consistency.

In the future, it would be awesome if you could send more focused
patches and make sure the diffs don’t show unrelated “noise.”


I'm sorry that it caused you extra work! For the record, this wasn't 
intended as a patch. We'd been working on this for a little while and 
wanted to get some feedback on particuarly the general direction before 
going any further. With a patch proposal i would have been more careful 
with noise etc.. This was really just a quick translation into guix.texi 
as requested. Maybe it would have been better if you had reviewed the 
link initially provided instead, as this was clearly not a patch.



Petter <pet...@mykolab.ch> skribis:

+Open the file in one of the editors. We'll now walk you through the 
updates you need to make in the operating-system declaration in turn 
from top to bottom.

+
+@table @asis
+@item @samp{host-name}
+Will be the name for this system. It'll be used for identifying this 
system on the network and should be unique amongst the computers in 
your LAN(s). You may also see it in shell prompts. Use ASCII letters 
and digits only unless you know what you're doing.

+
+@item @samp{timezone}
+This value must match a supported timezone exactly. To find the value 
you need here you can run the command

+@example
+tzselect
+@end example
+and answer its questions. When it asks "Is the above information OK?" 
answer "1" (Yes). The value in the last line of output is the value to 
use in your configuration.
+To get a shell prompt for running commands you can change virtual 
console (Ctrl-Alt-F#), or close the editor.

+
+@item @samp{locale}
+This value must match a supported locale exactly. To get a list of 
supported locales and their typing run the command

+@example
+ls /run/current-system/locale/@var{X.Y}
+@end @samp{example}
+where X.Y is the libc version (just press TAB at this level). Find 
the locale you want in the listed output and take note of exactly how 
it is typed (trailing / is not included in the name).
+To get a shell prompt for running commands you can change virtual 
console (Ctrl-Alt-F#), or close the editor.

+
+@item @samp{bootloader}
+Update the @samp{device} argument according to the comment in the 
example configuration. Typical value is @var{/dev/sda}, note there's 
no trailing digit. This will instruct the installation to install GRUB 
to the MBR of your disk. This is fine even if you're going to use the 
boot loader in your boot firmware, it will just be unused in this 
case.

+@end table


I did not include this as is because I think most of it is redundant
with (or should be covered by) the “operating-system Reference” 
section.


Ok. Well, this started as a standalone guide for libreboot.org. And the 
general idea was to guide the user through the entire installation 
process. Also there have been a few issues with locale on IRC, like 
specifying a locale that's not supported.



I have not yet integrated the bits about setting up an encrypted root
etc. because I first want the bits below to be fixed in the code.


+@subsection Booting a fully encrypted system
+
+@emph{This chapter is only for systems with encrypted boot.}
+
+To be able to boot with encrypted boot you need a system with GRUB 
flashed into the boot firmware, like with Coreboot/Libreboot.


It’s not clear to me how much of it is specific to Coreboot/Libreboot.
It seems like it could equally well work when GRUB is spawned by a
random proprietary BIOS no?


Yes, these are GRUB specific instructions, not Coreboot/Libreboot. These 
projects are used as examples.


This should be good for any system that can start GRUB without /boot 
access. I have only tried on Libreboot, which load the crypto modules 
automatically. Other systems may not do this and these modules would 
need to be loaded manually in this case. That's the only thing i can 
think of that could be different.



+@table @asis
+@item Manual steps to boot your fully encrypted system
+Press @kbd{c} in GRUB to enter command mode.


Seems to me that GuixSD should automatically DTRT when installing on an
encrypted root file system.  See <http://bugs.gnu.org/21843>.


+menuentry "GuixSD (current)" @{
+  cryptomount @var{grub-partition}
+  set root=(crypto0)
+  set guix_system=/var/guix/profiles/system
+  linux  $@{guix_system@}/kernel/bzImage 
--root=@var{your-root-partition} --system=$@{guix_system@} 
--load=$@{guix_system

Re: Review of installation manual draft

2016-02-05 Thread Petter

Hi Ludo,

Attached is a diff against guix.texi. I'm very new to texinfo so there 
may be some silly mistakes.


Petter

On 2016-01-31 10:28, l...@gnu.org wrote:

HI Petter,

Thanks a lot for working on it!  I’m at FOSDEM now but I hope to review
while on the train later today.

It would be easier for me if it were a diff against guix.texi.  Do you
think you could do that?  That would be awesome.  (If not I’ll comment
on what you sent.)

Ludo’.From 1ce9e2929843150f1ec1f6e265187cfe31f82f61 Mon Sep 17 00:00:00 2001
From: Petter <pet...@mykolab.ch>
Date: Fri, 5 Feb 2016 18:33:24 +0100
Subject: [PATCH] Merged installation proposal into guix.texi

---
 doc/guix.texi | 331 +-
 1 file changed, 256 insertions(+), 75 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 66ab384..1b8d1d2 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5623,104 +5623,230 @@ Introduction}).  The installation system runs the GPM mouse daemon,
 which allows you to select text with the left mouse button and to paste
 it with the middle button.
 
-To install the system, you would:
+@subsubsection Keyboard
 
-@enumerate
+The installation image uses the US Qwerty keyboard layout. If you want to change it you can use the @command{loadkeys} command with your preferred layout. Example @var{layout}: @samp{dvorak}.
+@example
+loadkeys @var{layout}
+@end example
 
-@item
-Configure the network, by running:
+@subsubsection Network
 
+Run the following command see what your network interfaces are called. Wired interfaces often start with @samp{e}, like @samp{eno1}. Wireless interfaces often start with @samp{w}, like @samp{w1p2s0}.
 @example
-ifconfig eno1 up && dhclient eno1
+ifconfig -a
 @end example
 
-to get an automatically assigned IP address from the wired
-network interface controller@footnote{
-@c http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c#n20
-The name @code{eno1} is for the first on-board Ethernet controller.  The
-interface name for an Ethernet controller that is in the first slot of
-the first PCI bus, for instance, would be @code{enp1s0}.  Use
-@command{ifconfig -a} to list all the available network interfaces.},
-or using the @command{ifconfig} command.
+@ftable @asis
+@item Wired connection
+To configure a wired network run the following command, substituting @var{network-interface} with the wired interface you want to use.
+@example
+ifconfig @var{network-interface} up
+@end example
 
-The system automatically loads drivers for your network interface
-controllers.
+@item Wireless connection
+To configure a wireless network create a configuration file and add a network stanza to it. Create and open a configuration file (location is not important)
+@example
+zile wpa_supplicant.conf
+@end example
 
-Setting up network access is almost always a requirement because the
-image does not contain all the software and tools that may be needed.
+Add the following stanza to it and update with actual ssid and password for the network you're connecting to:
+@example
+network=@{
+ssid=@var{network_name}
+key_mgmt=WPA-PSK
+psk=@var{network_password}
+@}
+@end example
+
+Start the wireless service and run it in the background with the following command. Substitute @var{network-interface} with the one you want to use.
+@example
+wpa_supplicant -c wpa_supplicant.conf -i @var{network-interface} -B
+@end example
+@end ftable
 
-@item
-Unless this has already been done, you must partition, and then format
-the target partition.
-
-Preferably, assign partitions a label so that you can easily and
-reliably refer to them in @code{file-system} declarations (@pxref{File
-Systems}).  This is typically done using the @code{-L} option of
-@command{mkfs.ext4} and related commands.
-
-Be sure that your partition labels match the value of their respective
-@code{device} fields in your @code{file-system} configuration, if your
-@code{file-system} configuration sets the value of @code{title} to
-@code{'label}, as do the example configurations found on the USB
-installation image under @file{/etc/configuration} (@pxref{Using the
-Configuration System}).
-
-@c FIXME: Uncomment this once GRUB fully supports encrypted roots.
-@c A typical command sequence may be:
-@c
-@c @example
-@c # fdisk /dev/sdX
-@c @dots{} Create partitions etc.@dots{}
-@c # cryptsetup luksFormat /dev/sdX1
-@c # cryptsetup open --type luks /dev/sdX1 my-partition
-@c # mkfs.ext4 -L my-root /dev/mapper/my-partition
-@c @end example
-
-The installation image includes Parted (@pxref{Overview,,, parted, GNU
-Parted User Manual}), @command{fdisk}, Cryptsetup/LUKS for disk
-encryption, and e2fsprogs, the suite of tools to manipulate
-ext2/ext3/ext4 file systems.
+Acquire an IP address. If you're on a network with DHCP you can run
+@example
+dhclient @var{network-interface}
+@end example
 
-@item
-Once that is done, mount the target root partition under @file{/mnt}

Re: Review of installation manual draft

2016-02-04 Thread Petter

Hi Ludo,

Yes, i should be able to do that. I don't know texinfo yet but i'm 
learning it now.


Petter



Re: modprobe on guix

2015-09-22 Thread Petter
> One solution would be to provide a /etc/environment file containing the
> right value for LINUX_MODULE_DIRECTORY (‘sudo’ honors that, according to
> sudoers(5).)

Yes, this is interesting. When i considered this previously i
prematurely put it aside because it requires PAM, and i wrongly
concluded our sudo wasn't configured with PAM (based on package
definition). On second look, i see PAM is on by default for Linux
distributions when building sudo; also running  sudo -V  as root user
confirms this. However, creating /etc/environment and putting stuff
there doesn't have any effect for me. But i believe the reason is that a
module needs to be added to linux-pam, namely pam_env[1].

I'd like to have a go at this and see if i can make a patch for this.

Maybe it makes sense to put /all/ the environment variables, especially
for root operations, in /etc/environment? From what i understand
variables from outside this file will not be expanded, so if not it
would mean duplicating definitions. Also, having this as a
just-for-those-sudo-users would be easy for root users to miss
updating. Then obviously root logins would have to make use of this file
as well, but i'm sure that can be arranged. I'll look more into this.

[1] http://www.linux-pam.org/Linux-PAM-html/sag-pam_env.html

Petter



Re: modprobe on guix

2015-09-20 Thread Petter
I've investigated a bit and have some light to shed on this issue.

First, I've tested printing the value of LINUX_MODULE_DIRECTORY as
suggested previously in this thread, and found it not to be a good test.

$ sudo bash -c "echo $LINUX_MODULE_DIRECTORY"
> /run/booted-system/kernel/lib/modules,
which shows indeed the expected output, but for the wrong reason.

This would be the shell doing the variable expansion while still in the
user's environment. Which makes it in effect similar to:
$ sudo bash -c "echo /run/booted-system/kernel/lib/modules"

Overwriting the variable in the user environment demonstrates this.
$ LINUX_MODULE_DIRECTORY=hello
$ sudo bash -c "echo $LINUX_MODULE_DIRECTORY"
> hello

Testing single quotes instead, which should leave the variable
unexpanded by the first shell.
$ sudo bash -c "echo $USER"
> petter
$ sudo bash -c 'echo $USER'
> root

And so this would be a better test.
$ sudo bash -c 'echo $LINUX_MODULE_DIRECTORY'
>
(empty value.)

As best i can find out  sudo  doesn't source any of the relevant shell
files, like /etc/profile; and so the root environment isn't set up like
if you logged in as root. And variables from the user environment isn't
passed on to it either. Besides using  sudo -E  , which passes on all
the user's environment variables (not recommended), the easiest fix
seems to be to use  sudo -i  . With  -i, --login  shell files will be
sourced, and we get an environment equal to being root user as far as i
can tell.

$ sudo -i bash -c 'echo $LINUX_MODULE_DIRECTORY'
> /run/booted-system/kernel/lib/modules

I don't know what the proper way of handling this is. But i'm using an
alias at the moment  alias sudo='sudo -i'  . With this  sudo modprobe
works fine.

(I've looked at whitelisting environment variables in /etc/sudoers, but
i believe this is for passing on user defined variables, not system
variables.)

Petter
(karhunguixi)



Re: [PATCH] Full encryption

2015-09-20 Thread Petter
Happy to help! :)

I've removed the custom initrd and define %linux-modules from my config,
and done:
sudo -i guix pull
sudo -i guix system reconfigure /etc/config.scm

Then rebooted. All ok!

Petter