Re: https://guix.gnu.org/ is offline

2022-10-19 Thread Brendan Tildesley




On 20/10/22 07:00, jbra...@dismail.de wrote:

October 19, 2022 1:18 AM, "Brendan Tildesley"  wrote:


https://guix.gnu.org doesn't load for me and another person in IRC

curl https://guix.gnu.org
curl: (7) Failed to connect to guix.gnu.org port 443 after 1838 ms: No route to 
host


Thanks for reporting!  I would encourage you to report this kind
of outages on IRC.  You'd probably get a response faster.  :)

I did, I just thought  id notify more people by posting here too.

 looks like https://guix.gnu.org/ is offline
 does guix.gnu.org load for anyone? i get 'ERR_ADDRESS_UNREACHABLE'



https://guix.gnu.org/ is offline

2022-10-18 Thread Brendan Tildesley

https://guix.gnu.org/ doesn't load for me and another person in IRC

curl https://guix.gnu.org/
curl: (7) Failed to connect to guix.gnu.org port 443 after 1838 ms: No 
route to host





Building hexyl (a rust app) without cargo, with antioxidant-build-system

2022-04-03 Thread Brendan Tildesley

I would have called it car/gone./

Do you believe sidestepping cargo all together like this is a good long 
term strategy?

In particular that importing packages will still be easy.

Re: Compiling rust things without cargo (super WIP POC)

2022-04-01 Thread Brendan Tildesley

Recently I did the bevy (game engine) hello world tutorial[1].
To facilitate less slow iteration time when developing, it supports 
dynamic linking,
disabling some optimizations, and using the lld linker for fast linking, 
although using lld failed for me.


When running cargo build, only your project is recompiled quickly and 
linked.


I was wondering how this dynamic linking might be facilitated in Guix?


Note: I had to update cargo to 0.60 to compile bevy with edition2021

[1] https://bevyengine.org/learn/book/getting-started/



Re: Improving importers best investment for growing gnu/packages/

2022-03-29 Thread Brendan Tildesley

On 29/3/22 19:01, Maxime Devos wrote:


Brendan Tildesley schreef op di 29-03-2022 om 10:50 [+1100]:

For example grepping build files it can be determined if pkg-config is used
and add it to inputs. an index of .pc files can automatically detect and add
the inputs a package is most likely looking for

Not sure what the cargo equivalent of this would be, but this looks
nice and feasible.


That was meant as an example of what Guix could provide that cargo doesn't.


Greetings,
Maxime.

Improving importers best investment for growing gnu/packages/

2022-03-28 Thread Brendan Tildesley

On 25/3/22 18:05, Paul Alesius wrote:


Rust analyzer is a language server for the Rust programming language.

I've tried to produce a patch for the latest version, and it has
probably hundreds of dependencies that need to be updated.


[...]


I'd suggest that a Guix package for rust-analyzer is not needed,
especially due to the excessive time required to update its package
definition and all of the vendored dependency crates, and focus should
instead be on rust and rust-cargo.


I understand how defeating it feels when looking at the countless hundreds of
dependencies that get pulled in, however, I believe this can be solved by
improving the importers in Guix.  I think it requires too much manual labour to
maintain packages curretly, particularly when refresh -u will only update the
package version and not dependencies.

Therefore I'm working on making use of
https://github.com/rust-lang/crates.io-index  to fully import base definitions
all required crates rather than pulling metadata from the internet with each 
refresh.

Maintaining rust packages then becomes mostly
1. Refresh generated package definitions
2. In a separate file edit any hacks/fix needed argument fields etc
3. Edit cargo-build-system to account for the most common hacks like setting
LIBCLANG_PATH.

It should be easy for a guix user to get all the latest crates that they would
get using cargo.

I think importers can be taken to the next level by going beyond metadata and
actually inspecting the contents of source files. For example grepping build
files it can be determined if pkg-config is used and add it to inputs. an index
of .pc files can automatically detect and add the inputs a package is most
likely looking for. One complaint about Guix is that typically just running
./configure; make on a project will not work, but if a guix can have a Universal
Importer where running guix wave-magic-wand in a directory can inspect files,
determine the build system, required inputs etc and build a program, would that
not be wonderful for programmers? Working on KDE made me feel like I was wasting
too much time manually adding inputs and would be better of writing an importer.

Using rust in a hypothetical, imagine if a rust developer that is otherwise
uninterested in Guix, they just want to build their software and distribute
actually chooses to use Guix not due to idealism but because it:
A. Handles their rust dependecies at least as well as cargo.
B. Handles their non-rust dependencies even better.
C. Improved Guix pack/build can produce distributable packages, stripped of
uneeded files that actually runs on other distributions.

Would that not be awesome?


Re: PipeWire as a PulseAudio replacement (was Re: The Shepherd on Fibers)

2022-03-27 Thread Brendan Tildesley

On 27/3/22 01:24, Josselin Poiret wrote:


Hello Brendan,

Brendan Tildesley  writes:

I would like to replace pulseaudio with pipewire as the default in
%desktop-services, the only hurdle is how to launch the user daemons in all the
different desktop configurations one might use. Other distros use systemd's
socket activation to magically launch pipewire.

Otherwise XDG autostarts or some kind of guix home service could
launch it?

The main issue for PipeWire is that it really doesn't support running a
single system-wide daemon as we're doing with PulseAudio, so you would
need to launch it through XDG autostart, guix home or something similar
like you said!


I think this is not right. Pulseaudio and Pipewire are both "user services".
The Guix (pulseaudio-service-type) merely sets up some global configuration 
files
and evironment variables. Actually these could be a part of the user profile if 
one
really wanted. The only parts that actually need to be done by root is the udev 
service
and the alsa service setting two configuration files.

Pulseaudio is automatically started by applications that make use of it via 
DBUS.
I don't understand how that works, but for whatever reason Pipewire's official 
way
to launch is via systemd sockets. Systems without systemd use XDG autolaunch 
with a
trivial script like this one:
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/pipewire/files/gentoo-pipewire-launcher.in

So it is not difficult at all to run Pipewire, just a method must be chosen.



One thing that I think is blocking right now is that PipeWire (or
actually WirePlumber, I don't remember) would need to see some
environment variables set by other user services eg. session D-Bus or
even the compositor, which isn't possible yet with Shepherd.


Which environment variables are you talking about? I'm running pipewire on Guix 
System

and it seems to work fine.


Best,

The Shepherd on Fibers

2022-03-24 Thread Brendan Tildesley
I think you are doing amazing work! I hope socket activation can be added
because it may be helpful for launching the user services for pipewire, but I've
never really understood how it actually works.

I would like to replace pulseaudio with pipewire as the default in
%desktop-services, the only hurdle is how to launch the user daemons in all the
different desktop configurations one might use. Other distros use systemd's
socket activation to magically launch pipewire.

Otherwise XDG autostarts or some kind of guix home service could launch it?



Re: Building guix system

2021-09-28 Thread Brendan Tildesley
To build the Guix System (The complete system you would call a GNU/Linux 
distribution),
first, install Guix its self on your existing distribution.

https://guix.gnu.org/manual/en/html_node/Binary-Installation.html

It's a bit involved since Guix is a unique program.
Then, download the git repository

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

cd guix;
Then you can build an image for any operating system definition. Start with one 
of the
examples in gnu/system/examples:
guix system image -t iso9660 gnu/system/examples/desktop.tmpl



What’s next?

2021-05-17 Thread Brendan Tildesley
Since you asked I'll dump my nebulous wishes here. Sorry that I don't have very
concrete suggestions and solutions, just things I think could be better.  I
should also state that 99% of my thoughts about Guix are through the filter of
"I want to build a Guix based desktop distribution that can be installed on
library, school, and home computers and Just Work better than Microsoft Windows"

1. Improve guix pull and updating reliability.
Updating guix for me is often like this:
$ guix pull
retrieving git objects
TLS error in stream blah blah blah
$ guix pull
retrieving git objects..34%. *dies but doesn't return to the prompt*
ctrl-c
$ guix pull
$ guix upgrade
$ sudo guix system reconfigure...
GUI desktop crashes back to TTY mysteriously.

Basically if guix pull can become as reliable as 'guix pull; guix pull; guix
pull; guix pull;, that would be great.  I think guix has many code paths
pertaining to downloading files where it chooses "Give Up" where "Try 2 or 3
times first" might be better.

Often downloads to source tarballs will download at ~30KiB/s. maybe some
axel-like system where both upstream an mirror urls are used might be good. Also
this may be wrong but from memory I think if the hash is wrong on a source
tarball, it will not bother trying to use the guix ci mirror of it, only if it's
404. So people with --no-substitutes can get completely stuck.

2. 'guix system reconfigure' without instantiating the new system until reboot.
I think the fact that reconfigure changes the whole system while its running is
a bit of a party trick, like pulling the table cloth out without any glasses
falling over.  For a Desktop GNU/Linux it kinda just accidentally works much of
the time. I've always thought I'd prefer the default to simply install the new
configuration in to GRUB and tell the user to reboot or add some flag like
--instatiate-now.


3. CLI consistency, e.g.,
$ guix package => nothing
$ guix system =>
guix system: missing command name
Try 'guix system --help' for more information.

$ guix package --list-generations, but
$ guix system list-generations ???\

Also https://issues.guix.gnu.org/47618


4. Make guix simpler and more performant.

Guix is complex. It has features that make it theoretically superior in many
ways, but in practice hasn't reached the reliability of simpler systems.  Every
aspect of Guix seems to take more time, cpu, ram, hd space than say pacman.
It's a bit beyond my skills to figure out how to actually improve these things
though.

$ guix system foobar

takes 1.5-3.0 seconds on SSD, stats 2374 files, with 345 No such file or
directories in order to determine the command doesn't exist and do nothing.
A fast guix could have 'guix time-machine -- environment --ad-hoc emacs --
emacs' run instantly after its been ran once, and some kind of 'guix run'
command could be added.

5. I think Guix should have some simple system to only update to the latest
commit where behemoths like webkit/chromium already have substitutes available
and that should maybe be the default way to update. It's not a big deal if we
are making people build stuff that only takes 30 seconds and uses minimal
ram. Doesn't need to be perfect. Ricardo made some simple scripts that did stuff
like that in the past.



[INFO]: Commit Access

2021-04-13 Thread Brendan Tildesley
Happy to see a committer with this goal for a ubiquitous operating system. I 
share the same goal, so I'm always thinking of how we can make everything Just 
Work by default.


Where to find dmesg and /etc contents of specific system generation?

2021-04-10 Thread Brendan Tildesley
I think if you type
guix system list-generations

you will see "canonical file name" which lists a path. inside there there is an 
etc directory that looks like the right one.


Re: Sourcehut packaging

2021-04-09 Thread Brendan Tildesley


> On 04/09/2021 11:45 PM Ron Nazarov  wrote:

> By sourcehut packages, do you mean node packages?
> Because I don't think there are any sourcehut packages in Guix yet.
> 
I mean packages with source url's on sr.ht, for example:

guix refresh scdoc 

doesnt have an updater



Re: Sourcehut packaging

2021-04-08 Thread Brendan Tildesley
Since your working on sourchut, would you also mind taking on adding an update 
for sourcehut packages, so that guix refresh works for them. There are many of 
them but no updater currently.


Re: Upgrading SIP.

2021-02-23 Thread Brendan Tildesley
> On 02/22/2021 6:50 PM Ludovic Courtès  wrote:
> 
>  
> Hi,
> 
> Brendan Tildesley  skribis:
> 
> > Building python-pyqtwebengine, it is unable to find the .sip files needed 
> > since it only searches one global path:
> >
> > openat(AT_FDCWD, "QtCore/QtCoremod.sip", O_RDONLY) = -1 ENOENT (No such 
> > file or directory)
> > openat(AT_FDCWD, 
> > "/tmp/guix-build-python-pyqtwebengine-5.15.2.drv-0/PyQtWebEngine-5.15.2/sip/QtWebEngineCore/QtCore/QtCoremod.sip",
> >  O_RDONLY) = -1 ENOENT (No such file or directory)
> > openat(AT_FDCWD, 
> > "/tmp/guix-build-python-pyqtwebengine-5.15.2.drv-0/PyQtWebEngine-5.15.2/sip/QtCore/QtCoremod.sip",
> >  O_RDONLY) = -1 ENOENT (No such file or directory)
> > openat(AT_FDCWD, 
> > "/tmp/guix-build-python-pyqtwebengine-5.15.2.drv-0/PyQtWebEngine-5.15.2/build/bindings/QtCore/QtCoremod.sip",
> >  O_RDONLY) = -1 ENOENT (No such file or directory)
> > openat(AT_FDCWD, 
> > "/lib/python3.8/site-packages/PyQt5/PyQt5/bindings/QtCore/QtCoremod.sip", 
> > O_RDONLY) = -1 ENOENT (No such file or directory)
> > write(2, ".sip-build-real: Unable to find "..., 61.sip-build-real: Unable 
> > to find file "QtCore/QtCoremod.sip"
> 
> Do you know how Qt (or whatever component is involved) searches for .sip
> files?
> 
> Most of the time, there’s a “search path” typically associated with an
> environment variable that we need to set accordingly (like PYTHONPATH,
> GUILE_LOAD_PATH, etc.).
> 
> Sometimes, that mechanism doesn’t exist upstream so we end up patching
> the software to add it.  This is what was done with OBS for instance,
> and that patch is now upstream.
> 
> HTH!
> 
> Ludo’.

https://www.riverbankcomputing.com/hg/sip/file/tip/sipbuild/builder.py#l273

There is a sip_include_dirs, but the bit that looks for bindings from other 
packages does so by looking in the target directory specified with --target-dir:

# Add any bindings from previously installed packages.
sip_include_dirs.append(
os.path.join(project.target_dir,
project.get_bindings_dir()))

Besides that it looks in current build directory. 

Currently I'm looking at updating sip and going back to the configure.py script 
to see if i can get that working first.



Upgrading SIP.

2021-02-22 Thread Brendan Tildesley
I'm looking at upgrading python-sip, since I think Calibre may need it, and 
presumably it needs updating anyway. Updating the package its self was trivial, 
but when building packages with it I came across some issues that seem unique 
to Guix/Nix's directory structure. SIP 5/6 uses sip-build instead of `python 
configure.py ...'.

Updating python-pyqt to use sip@6 mailto:sip@6 with sip-build results in some 
binaries being installed to a doubled up  
/gnu/store/.../gnu/store/...-python-wrapper.../bin/... path, since I used 
INSTALL_ROOT = %output, and set sip-build --target-dir to a relative path.

Building python-pyqtwebengine, it is unable to find the .sip files needed since 
it only searches one global path:

openat(AT_FDCWD, "QtCore/QtCoremod.sip", O_RDONLY) = -1 ENOENT (No such file or 
directory)
openat(AT_FDCWD, 
"/tmp/guix-build-python-pyqtwebengine-5.15.2.drv-0/PyQtWebEngine-5.15.2/sip/QtWebEngineCore/QtCore/QtCoremod.sip",
 O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, 
"/tmp/guix-build-python-pyqtwebengine-5.15.2.drv-0/PyQtWebEngine-5.15.2/sip/QtCore/QtCoremod.sip",
 O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, 
"/tmp/guix-build-python-pyqtwebengine-5.15.2.drv-0/PyQtWebEngine-5.15.2/build/bindings/QtCore/QtCoremod.sip",
 O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, 
"/lib/python3.8/site-packages/PyQt5/PyQt5/bindings/QtCore/QtCoremod.sip", 
O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ".sip-build-real: Unable to find "..., 61.sip-build-real: Unable to 
find file "QtCore/QtCoremod.sip"


So I'm wondering what the solution to this is. Does SIP 5 & 6 simply not 
support the Nix style of package management, or is there some simple way for us 
to make it work?
From f736357e2232e074dab9032a17deb2ab1eb020dc Mon Sep 17 00:00:00 2001
From: Brendan Tildesley 
Date: Mon, 22 Feb 2021 22:10:56 +1100
Subject: [PATCH 2/4] gnu: Add python-pyqt-builder.

* gnu/packages/qt.scm (python-pyqt-builder): New variable.
---
 gnu/packages/qt.scm | 21 +
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 38903803be..b9f34f39be 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2263,6 +2263,27 @@ itself.")
"--sipdir" sip)))
 (license (list license:gpl2 license:gpl3 ; choice of either license
 
+(define-public python-pyqt-builder
+  (package
+   (name "python-pyqt-builder")
+   (version "1.8.0")
+   (source
+(origin
+ (method url-fetch)
+ (uri (pypi-uri "PyQt-builder" version))
+ (sha256
+  (base32
+   "0335saz7h1j25gm766ssl3375kw1ak2vs3h764qsxzns3cyzvd9h"
+   (build-system python-build-system)
+   (inputs ;; not sure what type of inputs these should be
+`(("python-toml" ,python-toml)
+  ("python-packaging" ,python-packaging)
+  ("python-sip" ,python-sip)))
+   (home-page "https://www.riverbankcomputing.com/software/pyqt/;)
+   (synopsis "The PEP 517 compliant PyQt build system")
+   (description "The PEP 517 compliant PyQt build system")
+   (license (list license:gpl2 license:gpl3
+
 (define-public python-qtpy
   (package
 (name "python-qtpy")
-- 
2.30.1

From 26b04da35bbdc0bba09f4b4624371e20eb479266 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley 
Date: Mon, 22 Feb 2021 22:20:40 +1100
Subject: [PATCH 3/4] pyqt

---
 gnu/packages/qt.scm | 33 +++--
 1 file changed, 11 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index b9f34f39be..33b60a74d1 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2019,7 +2019,8 @@ module provides support functions to the automatically generated code.")
 "pyqt-public-sip.patch"
 (build-system gnu-build-system)
 (native-inputs
- `(("qtbase" ,qtbase))) ; for qmake
+ `(("qtbase" ,qtbase)
+   ("python-pyqt-builder" ,python-pyqt-builder)))
 (propagated-inputs
  `(("python-sip" ,python-sip)))
 (inputs
@@ -2044,6 +2045,7 @@ module provides support functions to the automatically generated code.")
   ,@%gnu-build-system-modules)
#:imported-modules ((guix build python-build-system)
,@%gnu-build-system-modules)
+   #:make-flags (list (string-append "INSTALL_ROOT=" %output))
#:phases
(modify-phases %standard-phases
  ;; When building python-pyqtwebengine,  can not be
@@ -2059,29 +2061,16 @@ module provides support functions to the automatically generated code.")
#t)))
  (replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- 

Re: A better way to access records.

2020-11-13 Thread Brendan Tildesley

On 1/11/20 8:01 am, Ludovic Courtès wrote:

Hi,

Brendan Tildesley  skribis:


In the guix codebase, on many occasions there appear things like this:

(match-lambda
     (($  agetty tty term baud-rate auto-login
     login-program login-pause? eight-bits? no-reset? remote?
flow-control?
     host no-issue? init-string no-clear? local-line extract-baud?
     skip-login? no-newline? login-options chroot hangup?
keep-baud? timeout
     detect-case? wait-cr? no-hints? no-hostname? long-hostname?
     erase-characters kill-characters chdir delay nice extra-options)
  (list
   

This has officially been Bad Practice for a while.  Instead, the
recommended approach is to use ‘match-record’ from (guix records).
There are examples of that primarily in (gnu services …).

Does that help?

Thanks,
Ludo’.


I suppose It makes sense that one would want to be explicit about names 
in a source code file.


BTW, if that is the recommended way, would someone with an understanding 
of the records.scm code mind adding support for delayed & thunked fields 
in match-record? There is a TODO there. I wouldn't know how to do it.





Re: A better way to access records.

2020-10-30 Thread Brendan Tildesley

On 30/10/20 8:49 pm, Leo Prikler wrote:

Well, the "functional" way of accessing them all in one go would be to
   (map (cute <> foo) (list package-name package-version package-...))
But I assume you want syntax like

(let-field record field exp*)
(let-fields record (field1 field2...) exp*)
No I didn't want to specify the fields at all, just have all of them 
automatically defined.

analogous to (srfi srfi-9 gnu) set-field and set-fields, am I right?

Regards, Leo






A better way to access records.

2020-10-30 Thread Brendan Tildesley
From the little bit of SICP that I've done, I recall watching the 
lectures where
they put a mage hat on and talk about the power of names. One could 
perhaps say

the most powerful tool in a programming language is the ability to give
something a name and then refer to those names.

In guix/guile, record types are  list of names given to some data.
For example:

(define foo
  (package
   (name "bar")
   (version "1.0")
   ...)

Here we the names foo, name, version, that refer to things of interest. 
We can

call foo easily enough to get the record, but we cannot refer to name or
version so easily.  We instead have to use accessors like (package-name 
foo),

which requires us to write foo each time explicitly and have repeat package-
for each accessor.
In the guix codebase, on many occasions there appear things like this:

(match-lambda
    (($  agetty tty term baud-rate auto-login
    login-program login-pause? eight-bits? no-reset? remote? 
flow-control?

    host no-issue? init-string no-clear? local-line extract-baud?
    skip-login? no-newline? login-options chroot hangup? keep-baud? 
timeout

    detect-case? wait-cr? no-hints? no-hostname? long-hostname?
    erase-characters kill-characters chdir delay nice extra-options)
 (list
  

Here we have given some names to things, abandoned those names, and once 
again

gone to the trouble of naming them again, in order, just for one local
environment. We'd have to do it again to make use of it elsewhere, and I 
assume

they would have to change if the record type it self needed to be updated.

Wouldn't be nice if we could just step inside a record type whenever we 
pleased?

The above would be like this perhaps:

(let-from-record-type 
 (list ...))

"let-from-record-type" i just made up since i dont know what it should be
called.  Anyhow, it seems like we're stepping back a few centuries in 
computer

science by needing to jump through these hoops.

The list of symbols can be retreived with (record-type-fields
), but I can't think of how one would write the above
syntax.

Opinions?





Re: Call for 1.2 installer testing.

2020-10-13 Thread Brendan Tildesley
Actually never mind, you did mention it underneath that, I should have 
kept reading!!






Re: Call for 1.2 installer testing.

2020-10-13 Thread Brendan Tildesley

On 12/10/20 6:32 am, pelzflorian (Florian Pelz) wrote:

On Sun, Oct 11, 2020 at 05:23:30PM +1100, Brendan Tildesley wrote:

Hi, I went through the installer looking for anything negative I could say
about it :) hope there is something helpful here:

Thank you for testing!



Unrelated driver bug: installer was just a black screen until I rebooted
with nomodeset:  https://paste.debian.net/1166581/
Even with nomodeset, I get an error about no UMS supported in radeon, but it
doesn't stop anything.

This black screen regression should be “fixed” now (commit
34d436a4082b5c5f23b00e13eb8e5a92d957d704) by passing a kernel argument
“modprobe.blacklist=radeon” which disables the radeon driver.


I think you copy-pasted the wrong link in to that commit. it links to a 
thread about the translation stuff i mentioned below, not about the 
radeon driver.


- https://lists.gnu.org/archive/html/guix-devel/2019-03/msg00441.html





Re: Call for 1.2 installer testing.

2020-10-11 Thread Brendan Tildesley
On October 12, 2020 7:32:08 AM GMT+11:00, "pelzflorian (Florian Pelz)" 
 wrote:
>On Sun, Oct 11, 2020 at 05:23:30PM +1100, Brendan Tildesley wrote:
>> Hi, I went through the installer looking for anything negative I
>could say
>> about it :) hope there is something helpful here:
>
>Thank you for testing!
>
>
>> Unrelated driver bug: installer was just a black screen until I
>rebooted
>> with nomodeset:  https://paste.debian.net/1166581/
>> Even with nomodeset, I get an error about no UMS supported in radeon,
>but it
>> doesn't stop anything.
>
>This black screen regression should be “fixed” now (commit
>34d436a4082b5c5f23b00e13eb8e5a92d957d704) by passing a kernel argument
>“modprobe.blacklist=radeon” which disables the radeon driver.
>
>(This was also blacklisted in the last release 1.1.0 of Guix, see
><https://issues.guix.gnu.org/40599>.  I had removed
>“modprobe.blacklist=radeon” because it was for some time no longer
>needed on one of my machines.)
>
>Some users will have a black screen in the installed system as well
>(if they use Linux-libre).  I don’t think we can do much about that.
>Niels <https://issues.guix.gnu.org/40599#8> only had trouble with the
>installer but did not on the installed system.  It seems not feasible
>to predict which users would have a black screen in the installed
>system, so we cannot add instructions only for them.
>
>
>
>> Languages listed in the language selection are sometimes in English,
>Rarely
>> in the native language. […]
>> Random thought: could we adapt the installer to use the same
>sentences from
>> an existing installer, like the ubuntu one, so that all the
>translations can
>> be copied in for free? All the basic quesions like please choose a
>password
>> are surely shared between these installers.
>
>Yes, we could copy translations without understanding the language (at
>least after our planned switch from the Translation Project to our own
>hosted Weblate translation infrastructure).
>
>Regards,
>Florian

I forgot to mention that the trisquel 8.0 installer did in fact work on the 
same computer. I was able to boot to the desktop, so it doesn't seem like a 
Linux libre issue. I wonder where the bug is introduced, and how I could 
isolate the bug. Maybe I could build versions of the installer with the LTS 
Linux or other versions to see if they work. Could the use of kmscon  possibly 
be related?

Re: Call for 1.2 installer testing.

2020-10-11 Thread Brendan Tildesley
Hi, I went through the installer looking for anything negative I could 
say about it :) hope there is something helpful here:



Unrelated driver bug: installer was just a black screen until I rebooted 
with nomodeset:  https://paste.debian.net/1166581/
Even with nomodeset, I get an error about no UMS supported in radeon, 
but it doesn't stop anything.



Languages listed in the language selection are sometimes in English, 
Rarely in the native language. What's the difference between "Mandarin 
Chinese" and "Chinese"?. I guess this just requires translation data. 
The names of languages in their respective languages is something that 
already exists in a million different projects already, can we just copy 
them in?
Even when choosing Mandarin Chinese, nothing in the installer is in 
Mandarin. I guess one also needs to choose the final system language too.
Random thought: could we adapt the installer to use the same sentences 
from an existing installer, like the ubuntu one, so that all the 
translations can be copied in for free? All the basic quesions like 
please choose a password are surely shared between these installers.


The installer allows choosing the installation USB its self as a target, 
which I imagine would result in a disaster? People can shoot themselves 
in the foot if they want I guess?


No indication of what buttons one needs to use what: space, enter, tab, 
nor that there are other TTYs with documentation and how to get to them.


Enter selects and takes you to the next line when its an input box, but 
it does not select and take you out of it to the button below if it is 
the bottom most checkbox. one must then move to the tab button.


Down arrow in a checkbox list takes you down to the bottom of the list, 
but then it will not jump out to the button below. It does take you from 
Ok to Exit though, like left-right, but it wont cross the barriers.


space doesnt select menu items, but does select and move down checkbox 
lists, and selects buttons


I found my self switching between enter, tab, and space to get through, 
by going of intuition and thinking "do what i mean".


Perhaps Esc should escape when it makes sense.


After getting through the install with encrypted root, The install 
finally fails trying to install grub with:


|Installing for i386-pc platform. grub-install: warning: this GPT 
partition label contains no BIOS Boot Partition; embedding won't be 
possible. grub-install: error: embedding is not possible, but this is 
required for RAID and LVM install. |





Re: ‘guix environment’ vs. ‘.bash_profile’

2020-09-12 Thread Brendan Tildesley
Doom Emacs has a tool `doom doctor' for diagnosing common errors. 
Perhaps there could be a `guix doctor' that would check for such things. 
`guix offload test' is already somewhat like that but for offloading, 
althought it could improve. Any bug report from a user where the 
solution is to tell them to fix their environment instead of changing 
guix could also have a check added to guix doctor. Also, we could 
collect knowledge on aspects of GNU/Linux that are unique to Guix that 
one often doesn't learn about on other distributions and include a page 
in the manual. for example I never had any use for sudo -E or sudo -i 
until I started using Guix.





Re: SHA256 performance with Guile 2.2 vs. Guile 3.0

2020-01-03 Thread Brendan Tildesley

> Still far from the libgcrypt implementation in C + asm, but hey!

Actually guix hash is still a lot slower than using the sha256sum cli 
tool. For me 7x faster for the guile tarball, and 4x faster for a 700MiB 
file. Maybe because guile opens a file with it's ports and feeds it to 
libgcrypt. If guix is heavy relying on hashing files stored in the 
filesystem, maybe it would be better to directly use sha256sum or 
perhaps libgcrypt has a function do open a file and hash it on it's own?





Re: Multiseat in Guix

2019-10-25 Thread Brendan Tildesley
I don't know how to do this but I've always been fascinated by it, so I
just wanted to bump this and say that I think it's a really important
feature to get working (eventually), because for example schools can set
up a computer lab of 30 workstations using only 15 actual computers,
saving money and waste. I notice guix has a kmscons configuration for
the installer, but that project seems abandoned.




Should font-build-system compile sfd fonts?

2019-05-03 Thread Brendan Tildesley
I'm calling for anyone's opinion on this. Currently there are a few
fonts which more-or-less copy-paste the same code for compiling sfd
files in to ttf and otf, which requires fontforge. I wish to add another
font, but didn't want to add to this duplication. Most fonts don't
require it, but it wouldn't be harmful, apart from dragging in
fontforge, would adding a 'build phase that does this to
font-build-system be reasonable. I'm not actually sure how to add a
required native-input to a build system. Or is there a better idea?
Making a whole new sfd-font-build-system, or defining a build-sdf-fonts
symbol that could be added with modify-phases and adding fontforge to
native-inputs?



Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch

2018-11-12 Thread Brendan Tildesley
On 08/13/18 08:09, Danny Milosavljevic wrote:
> Okay. To compare, try this:
> $ ps $(pgrep -U `id -u` '^dbus-daemon$') |grep session |grep -v /run/user/
> Notice the PID (first column) and then do:
> $ cat /proc//environ  |tr '\0' '\n' |grep XDG
>
> Is the result the same?
b@ui ~$ ps $(pgrep -U `id -u` '^dbus-daemon$') |grep session |grep -v
/run/user/
  708 ?    Ss 0:00
/gnu/store/5bda3bgy871dyb9cna4k7gnz002j88rq-dbus-1.12.6/bin/dbus-daemon
--syslog-only --fork --print-pid 5 --print-address 7 --session
b@ui ~$ cat /proc/708/environ  |tr '\0' '\n' |grep XDG
XDG_VTNR=7
XDG_SESSION_ID=c1
XDG_DATA_DIRS=/gnu/store/ifq7znihd687bgz4gkn9vy1dsk60k7xl-shared-mime-info-1.8/share:/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/share:/gnu/store/hiij9hlxq53w39g0maf67b842j15kw22-gtk+-3.22.30/share:/gnu/store/6zhrh72zsfv4h8jw64rvzs3jcpm1ypmn-modem-manager-1.4.14/share:/gnu/store/n3zml7g3gfp0wgxrwqzairbqx9ab3q8l-network-manager-applet-1.8.4/share:/home/b/.guix-profile/share:/run/current-system/profile/share:/home/b/.guix-profile/share:/run/current-system/profile/share
XDG_SEAT=seat0
XDG_RUNTIME_DIR=/run/user/1000
XDG_CONFIG_DIRS=/home/b/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg
b@ui ~$



>
>> ** (pcmanfm:1051): WARNING **: 20:10:52.602: XDG_TEMPLATES_DIR is set to
>> invalid path, ignoring it
>>
>> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.604: Unable to locate theme
>> engine in module_path: "adwaita",
>>
>> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.605: Unable to locate theme
>> engine in module_path: "adwaita",
>>
>> (pcmanfm:1051): Gtk-WARNING **: 20:10:52.606: Unable to locate theme
>> engine in module_path: "murrine",
> Hmm, I tried to find where it explicitly looks up "adwaita" and "murrine"
> in pcmanfm, but I couldn't find it.
>
> Can you try the following?
>
> $ export XDG_TEMPLATES_DIR=/tmp
> $ gdb --args pcmanfm --g-fatal-warnings
> (gdb) r
> ... wait until it crashes
> (gdb) bt
>
> and post the result here.  It should make it possible for us to find
> out where the "lookup" instruction is.
b@ui ~$ export XDG_TEMPLATES_DIR=/tmp
b@ui ~$ gdb --args pcmanfm --g-fatal-warnings
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
    .

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pcmanfm...(no debugging symbols found)...done.
(gdb) r
Starting program:
/gnu/store/32zqds837fjm6ql4lsk2v27hn0j3zszc-profile/bin/pcmanfm
--g-fatal-warnings
[Thread debugging using libthread_db enabled]
Using host libthread_db library
"/gnu/store/l4lr0f5cjd0nbsaaf8b5dmcw1a1yypr3-glibc-2.27/lib/libthread_db.so.1".
[New Thread 0x7fffef53b700 (LWP 999)]
[New Thread 0x7fffeeb2a700 (LWP 1000)]
[New Thread 0x7fffee199700 (LWP 1001)]

** (pcmanfm:995): WARNING **: 18:22:56.725: XDG_TEMPLATES_DIR is set to
invalid path, ignoring it

Thread 1 "pcmanfm" received signal SIGTRAP, Trace/breakpoint trap.
0x74f9b2c1 in _g_log_abort () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
(gdb) bt
#0  0x74f9b2c1 in _g_log_abort () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
#1  0x74f9c515 in g_logv () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
#2  0x74f9c662 in g_log () from
/gnu/store/x9lfcagl47zbb6krfpmwm31m70s9pk00-glib-2.56.0/lib/libglib-2.0.so.0
#3  0x75a76345 in _fm_templates_init () from
/gnu/store/4r9sh1ddhkd3qh92hxzqanjsxikzhqzi-libfm-1.3.0.2/lib/libfm.so.4
#4  0x75a638d3 in fm_init () from
/gnu/store/4r9sh1ddhkd3qh92hxzqanjsxikzhqzi-libfm-1.3.0.2/lib/libfm.so.4
#5  0x77851691 in fm_gtk_init () from
/gnu/store/4r9sh1ddhkd3qh92hxzqanjsxikzhqzi-libfm-1.3.0.2/lib/libfm-gtk.so.4
#6  0x00413714 in main ()
(gdb)
>
>>> I suspect that the gvfs service file is either not there, the environment
>>> variable is not set or the executable mentioned inside the service file
>>> is not found.
>>>
>>> For better debugging, try:
>>>
>>> youruser$ export DBUS_VERBOSE=1
>>> youruser$ evince
>>>
>>> And post the result here.  
There is no output
>> ** (evince:1019): WARNING **: 20:07:46.869: Error retrieving
>> accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
>> The name org.a11y.Bus was not provided by any .service files
>> Error registering document:
>> GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
>> 

Re: Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch

2018-08-05 Thread Brendan Tildesley
On 08/05/18 10:23, Danny Milosavljevic wrote:
> Hi Brendan,
>
> On Thu, 2 Aug 2018 16:21:02 +1000
> Brendan Tildesley  wrote:
>
>> I've always had gvfs installed and it hasn't made any difference as far
>> as I can tell
> Hmm, what does your ~/.guix-profile/share/dbus-1/services directory contain?

ca.desrt.dconf.service   
org.freedesktop.IBus.service 
org.gnome.FileRoller.ArchiveManager1.service 
org.gtk.vfs.Daemon.service   
org.gtk.vfs.UDisks2VolumeMonitor.service
org.a11y.Bus.service 
org.freedesktop.portal.IBus.service  
org.gnome.FileRoller.service 
org.gtk.vfs.GPhoto2VolumeMonitor.service  org.xfce.FileManager.service
org.fcitx.Fcitx.service  
org.freedesktop.Telepathy.Client.Vinagre.service 
org.gnome.Nautilus.service   
org.gtk.vfs.Metadata.service  org.xfce.Thunar.service
org.freedesktop.FileManager1.service 
org.gnome.evince.Daemon.service  
org.gnome.Rhythmbox3.service 
org.gtk.vfs.MTPVolumeMonitor.service

>
> What is the environment variable XDG_DATA_DIRS set to?
/home/b/.guix-profile/share:/run/current-system/profile/share:/home/b/.guix-profile/share:/run/current-system/profile/share

(Not sure why it's repeated twice.)
> [...]
>> but it didn't fix the issue, and caused those weird errors. Actually I'm
>> not getting those errors anymore, maybe due to reconfiguring and
>> rebooting. 
> Even more progress :)
Ok they are there for pcmanfm, but not evince.
It may be unrelated but I also get these messages with pcmanfm
(XDG_TEMPLATES_DIR  is empty)

** (pcmanfm:1051): WARNING **: 20:10:52.602: XDG_TEMPLATES_DIR is set to
invalid path, ignoring it

(pcmanfm:1051): Gtk-WARNING **: 20:10:52.604: Unable to locate theme
engine in module_path: "adwaita",

(pcmanfm:1051): Gtk-WARNING **: 20:10:52.605: Unable to locate theme
engine in module_path: "adwaita",

(pcmanfm:1051): Gtk-WARNING **: 20:10:52.606: Unable to locate theme
engine in module_path: "murrine",


> [...]
> If you are motivated, I suggest to try to proceed to get the version
> without "dbus-launch bash" (but with slim configured to use dbus-launch)
> to work.  It can't be missing much now.
I'm motivated it's just I have very little clue what I'm doing.
>
> I suspect that the gvfs service file is either not there, the environment
> variable is not set or the executable mentioned inside the service file
> is not found.
>
> For better debugging, try:
>
> youruser$ export DBUS_VERBOSE=1
> youruser$ evince
>
> And post the result here.
** (evince:1019): WARNING **: 20:07:46.869: Error retrieving
accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown:
The name org.a11y.Bus was not provided by any .service files
Error registering document:
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gnome.evince.Daemon was not provided by any .service files





Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch

2018-08-02 Thread Brendan Tildesley
On 08/01/18 07:54, Danny Milosavljevic wrote:
> Hi,
>
> dbus is an object-oriented inter-process-communication mechanism.
>
> On a typical single-user system there's one user bus, at least one session
> bus and one system bus.
>
> On a typical multi-user system there's multiple user buses, at least as many
> session buses and one system bus.
>
> >From your messages I suspect that the dbus session bus for your session is 
> >not
> running.
>
> Try invoking
>
>  echo $DBUS_SESSION_BUS_ADDRESS
>
> .
>
> If it's empty, no session bus is running.
>
> Many many GNOME parts try to use dbus for everything (also arguably for
> things which would work perfectly well without dbus, but whatever).
>
> dbus-launch is used to start a message bus from a shell script.
>
> It's usually chained together like this (that's how I use it for real):
>
> $ exec dbus-launch ssh-agent fluxbox
>
> This means that dbus-launch will set up some environment variables,
> invoke the daemon and then invoke dbus-daemon and then invoke the
> child (here, ssh-agent, passing it "fluxbox"), passing it the environment.
>
> If you invoke "dbus-launch evince" it's starting a mini-session bus
> and in there invokes evince.  Evince then cannot connect to the other
> services in your session (because there are no other such services in
> this mini-session).
>
> I think modifying the slim service to use dbus-launch when starting
> the session should have worked just fine.
>
>>> I tried modifying the slim service to launch the session with
>> dbus-launch, but that only served to create some new errors when running
>> pcmanfm:
> Yes, but what does
>
>   echo $DBUS_SESSION_BUS_ADDRESS
>
> say now?
>
>> invoking IsSupported() failed for remote volume monitor with dbus name
> ^^ ???
>
> Also, here, it's not finding lots of service files.  Something needs to make
> sure that the dbus daemon finds the service files.  Usually we have an 
> environment
> variable for that (see further below).
>
> There are system services in /etc/dbus-1/system-services which should be 
> found in
> all cases.
>
> Among those is org.freedesktop.UDisks2 which is not 
> org.gtk.vfs.UDisks2VolumeMonitor .
>
> org.gtk.vfs.UDisks2VolumeMonitor is not in the directory 
> /etc/dbus-1/system-services .
>
> Then there's the ~/.guix-profile/share/dbus-1/services directory.
>
> ~/.guix-profile/share is one of the XDG_DATA_DIRS.
>
> dbus-specification.xml specifies that $XDG_DATA_DIRS/dbus-1/services is to be
> searched by the user bus.
>
> But this directory only contains files of packages that I personally installed
> into my profile - not of the dependencies.  In this case I didn't install the
> package of org.gtk.vfs.UDisks2VolumeMonitor - so the service file resides in
> /gnu/store/85ih21qjgqcicjkqkw5v96wjvh9hq9g3-gvfs-1.32.1/share/dbus-1/services/org.gtk.vfs.UDisks2VolumeMonitor.service
>  .
>
> I wonder why it works with the GNOME desktop.  Does it really?
>
> Possible workaround:
>
> youruser$ guix package -i gvfs
I've always had gvfs installed and it hasn't made any difference as far
as I can tell
>
> Possible fix:
>
> Make nautilus and other Guix packages using gvfs propagate gvfs.
>
> Possible different fix:
>
> Add profile hook which also automatically provides service files of 
> dependencies
> without installing the packages into the profile.  I'm not sure how useful 
> that it
> since dbus will prefer a running service to service files anyway (I think).  
> But
> at least we would notice a conflict.
> Also, is it able to statically determine what these dependencies are?

Previously there was no $DBUS_SESSION_BUS_ADDRESS. After I modified slim
to add dbus-launch, I have
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-Rc7AP3Xnzz,guid=97d26aba11773a9ce755829b5b611375

but it didn't fix the issue, and caused those weird errors. Actually I'm
not getting those errors anymore, maybe due to reconfiguring and
rebooting. When I run `dbus-launch bash` , it overwrites that value with
a new value in the current environment:
unix:abstract=/tmp/dbus-1vzMgxAURi,guid=98eb63bd2e22340a0c1d3bd85b6116d5
 and then running pcmanfm/evince only from that bash shell works fine,
running outside it or from dmenu doesn't.




Programs like pcmanfm, evince, ... don't connect to dbus unless run with dbus-launch

2018-07-26 Thread Brendan Tildesley
Continuing on from my previous thread here:
https://lists.gnu.org/archive/html/help-guix/2017-11/msg00084.html

I discovered that I was able to work around the problem by running
pcmanfm with dbus-launch. Running `dbus-launch evince` also fixed an
issue I had with Evince not remembering the last page I was on in a
document. However, I understand next to nothing about dbus, gvfs, ,etc,
so I'm still not sure what the answer is. But I think this is the
essential clue that identifies the problem.

I tried modifying the slim service to launch the session with
dbus-launch, but that only served to create some new errors when running
pcmanfm:

---

invoking IsSupported() failed for remote volume monitor with dbus name
org.gtk.vfs.UDisks2VolumeMonitor::
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gtk.vfs.UDisks2VolumeMonitor was not provided by any .service files
(g-dbus-error-quark, 2)
invoking IsSupported() failed for remote volume monitor with dbus name
org.gtk.vfs.GPhoto2VolumeMonitor::
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gtk.vfs.GPhoto2VolumeMonitor was not provided by any .service files
(g-dbus-error-quark, 2)
invoking IsSupported() failed for remote volume monitor with dbus name
org.gtk.vfs.MTPVolumeMonitor::
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
org.gtk.vfs.MTPVolumeMonitor was not provided by any .service files
(g-dbus-error-quark, 2)
---

Although I can run `dbus-launch bash` from a terminal and then run
pcmanfm from there and it will work fine (no longer displays the hidden
mounts, and displays my actual hard drives, and lets me mount them). It
be great if someone could help solve this, I know at least a couple
other people in the irc chat have experienced this bug, usually when
using some tiling wm like i3 instead of the full GNOME desktop. Is it an
issue with SLiM, or and issue somewhere else?




Re: MIME database

2017-11-29 Thread brendan . tildesley
> On Tue 28 Nov 2017 12:23, Alex Vong  writes:
> 
>> julien lepiller  writes:
>>
>>> Le 2017-11-28 10:24, l...@gnu.org a écrit :
 brendan.tildes...@openmailbox.org skribis:

[...]
> 
> I think it's reasonable to want to be able to open PDFs in inkscape or
> GIMP (e.g. via the "Open With" menu in a file browser like Nautilus),
> just that they shouldn't be the default option.  I think removing the
> association would be a not-so-good option; the blessed way to fix this
> is apparently to install a set of defaults.
> 
> Specifically we should add to this package from gnome.scm to include the
> PDF -> evince association:
> 
> (define-public gnome-default-applications
>   (package
> (name "gnome-default-applications")
> (version "0")
> (build-system trivial-build-system)
> (source #f)
> (propagated-inputs
>  `(("nautilus" ,nautilus)))
> (arguments
>  `(#:modules ((guix build utils))
>#:builder
>(begin
>  (use-modules (guix build utils))
>  (let* ((out (assoc-ref %outputs "out"))
> (apps (string-append out "/share/applications")))
>(mkdir-p apps)
>(call-with-output-file (string-append apps "/defaults.list")
>  (lambda (port)
>(format port "[Default Applications]\n")
>(format port 
> "inode/directory=org.gnome.Nautilus.desktop\n")))
>#t
> (synopsis "Default MIME type associations for the GNOME desktop")
> (description
>  "Given many installed packages which might handle a given MIME type, 
> a
> user running the GNOME desktop probably has some preferences: for example,
> that folders be opened by default by the Nautilus file manager, not the 
> Baobab
> disk usage analyzer.  This package establishes that set of default MIME 
> type
> associations for GNOME.")
> (license license:gpl3+)
> (home-page #f)))
> 
> Possibly we could have a set of defaults for XFCE as well.  See also
> https://wiki.archlinux.org/index.php/default_applications#XDG_standard.
> 
> Andy
That wiki points to 
https://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html

I stumbled across this thread 
https://mail.gnome.org/archives/distributor-list/2015-January/msg0.html
That claims defaults.list is deprecated.

Following the latest spec, gnome-default applications should create 
mimeapps.list instead of defaults.list, or perhaps gnome-mimeapps.list, which 
will then be used if XDG_CURRENT_DESKTOP=GNOME .
With {gnome,xcfe,...]-mimeapps.list, multiple non-conflicting mimeapps.list 
files can be installed and used appropriately when one logs in to a particular 
desktop environment.

Why does gnome-default-applications have nautilus as a propagated-input? I'd 
have expected such a package to merely install the mimedata and do nothing 
else. And currently it just installs one line for nautilus.
Fedora-Workstation has the file 
http://pkgs.fedoraproject.org/cgit/rpms/shared-mime-info.git/tree/gnome-mimeapps.list
 as a part of "shared-mime-data". When I launched Fedora in VM, I found it also 
has this identical file at 

/usr/share/applications/mimedata.list
as well ass
/usr/share/applications/gnome-mimedata.list

I'm not sure why they chose to do that.

I'm wondering what people like me who use tiling window managers should do. 
Should we install such a file and set XDG_CURRENT_DESKTOP=GNOME to get the 
benefit of GNOME defaults? But then mixing applications from multiple desktops 
becomes an issue.
The thing I want to achieve is good *defaults*, but installing such things and 
setting a variable directly contradicts that. This implies the solution 
probably ought to involve modifying shared-mime-info or xdg-mime-database such 
that the resulting mime data generated by update-mime-database embeds these 
common-sense defaults like preferring Evince/Okular over Gimp for PDF files. 
The mime-apps specs even labels the system installed mimeapps.list files as 
"distribution-provided defaults" suggesting that it is the role of distribution 
developers to manipulate these files as they see fit to produce good defaults. 
Although, how would one do it without making Okular appear in the list of 
applications even when it is not actually installed? I'll have to investigate 
how update-mime-database works.

Re: MIME database

2017-11-29 Thread brendan . tildesley
l...@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> (Moving the discussions to guix-devel.)
>
> brendan.tildes...@openmailbox.org skribis:
>
[...]
>> This makes me feel that it's desirable for us to also tweak mimedata to make
>> it more sensible -- Pdf's should open in a pdf reader before it opens in an
>> image editor. It seems unrealistic to only tweak upstream projects to make 
>> all
>> this mimedata mesh together perfectly to produce ideal default behaviour.
>
> Right, so I think the immediate course of action here would be to patch
> GIMP’s MIME data so that it does not register as a PDF viewer.
>
> If we stumble upon other issues like that, we can fix them similarly.
>
> How does that sound?
>
Well, in my interpretation, the mime data just says that it's can handle PDF's, 
not necessarily that it's at PDF reader. If a PDF is opened with Gimp, it shows 
an interface for importing it as images, so I don't feel like it's a mistake 
for Gimp to mark it's self as being able to handle PDF's. If we make actual PDF 
readers have priority over Gimp somehow, Gimp will still be under the list of 
suggested applications when one right clicks on a *.pdf file in a file manager, 
but making this change would completely remove Gimp as an option. 

From the perspective of Gimp developers, they have no power to make Gimp's 
mimedata cause ideal behaviour on, because mimedata is simply not very 
versatile, so listing Gimp as being able to handle application/pdf isn't a 
mistake on their part.

The best solution might be to create mimeapps.list files that take precedence 
over mimeinfo.cache. I'm not sure which package it should go in though.


Re: MIME database

2017-11-29 Thread brendan . tildesley
(Apparently I replied only to Andy but not the mailing list by accident, so I'm 
sending this again)
> On Tue 28 Nov 2017 12:23, Alex Vong  writes:
> 
>> julien lepiller  writes:
>>
>>> Le 2017-11-28 10:24, l...@gnu.org a écrit :
 brendan.tildes...@openmailbox.org skribis:

[...]
> 
> I think it's reasonable to want to be able to open PDFs in inkscape or
> GIMP (e.g. via the "Open With" menu in a file browser like Nautilus),
> just that they shouldn't be the default option.  I think removing the
> association would be a not-so-good option; the blessed way to fix this
> is apparently to install a set of defaults.
> 
> Specifically we should add to this package from gnome.scm to include the
> PDF -> evince association:
> 
> (define-public gnome-default-applications
>   (package
> (name "gnome-default-applications")
> (version "0")
> (build-system trivial-build-system)
> (source #f)
> (propagated-inputs
>  `(("nautilus" ,nautilus)))
> (arguments
>  `(#:modules ((guix build utils))
>#:builder
>(begin
>  (use-modules (guix build utils))
>  (let* ((out (assoc-ref %outputs "out"))
> (apps (string-append out "/share/applications")))
>(mkdir-p apps)
>(call-with-output-file (string-append apps "/defaults.list")
>  (lambda (port)
>(format port "[Default Applications]\n")
>(format port 
> "inode/directory=org.gnome.Nautilus.desktop\n")))
>#t
> (synopsis "Default MIME type associations for the GNOME desktop")
> (description
>  "Given many installed packages which might handle a given MIME type, 
> a
> user running the GNOME desktop probably has some preferences: for example,
> that folders be opened by default by the Nautilus file manager, not the 
> Baobab
> disk usage analyzer.  This package establishes that set of default MIME 
> type
> associations for GNOME.")
> (license license:gpl3+)
> (home-page #f)))
> 
> Possibly we could have a set of defaults for XFCE as well.  See also
> https://wiki.archlinux.org/index.php/default_applications#XDG_standard.
> 
> Andy
That wiki points to 
https://standards.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html

I stumbled across this thread 
https://mail.gnome.org/archives/distributor-list/2015-January/msg0.html
That claims defaults.list is deprecated.

Following the latest spec, gnome-default applications should create 
mimeapps.list instead of defaults.list, or perhaps gnome-mimeapps.list, which 
will then be used if XDG_CURRENT_DESKTOP=GNOME .
With {gnome,xcfe,...]-mimeapps.list, multiple non-conflicting mimeapps.list 
files can be installed and used appropriately when one logs in to a particular 
desktop environment.

Why does gnome-default-applications have nautilus as a propagated-input? I'd 
have expected such a package to merely install the mimedata and do nothing 
else. And currently it just installs one line for nautilus.
Fedora-Workstation has the file 
http://pkgs.fedoraproject.org/cgit/rpms/shared-mime-info.git/tree/gnome-mimeapps.list
 as a part of "shared-mime-data". When I launched Fedora in VM, I found it also 
has this identical file at 

/usr/share/applications/mimedata.list
as well ass
/usr/share/applications/gnome-mimedata.list

I'm not sure why they chose to do that.

I'm wondering what people like me who use tiling window managers should do. 
Should we install such a file and set XDG_CURRENT_DESKTOP=GNOME to get the 
benefit of GNOME defaults? But then mixing applications from multiple desktops 
becomes an issue.
The thing I want to achieve is good *defaults*, but installing such things and 
setting a variable directly contradicts that. This implies the solution 
probably ought to involve modifying shared-mime-info or xdg-mime-database such 
that the resulting mime data generated by update-mime-database embeds these 
common-sense defaults like preferring Evince/Okular over Gimp for PDF files. 
The mime-apps specs even labels the system installed mimeapps.list files as 
"distribution-provided defaults" suggesting that it is the role of distribution 
developers to manipulate these files as they see fit to produce good defaults. 
Although, how would one do it without making Okular appear in the list of 
applications even when it is not actually installed? I'll have to investigate 
how update-mime-database works.

Re: MIME database

2017-11-29 Thread brendan . tildesley
(Apparently I replied only to ludo but not the mailing list by accident, so I'm 
sending this again)

l...@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> (Moving the discussions to guix-devel.)
>
> brendan.tildes...@openmailbox.org skribis:
>
[...]
>> This makes me feel that it's desirable for us to also tweak mimedata to make
>> it more sensible -- Pdf's should open in a pdf reader before it opens in an
>> image editor. It seems unrealistic to only tweak upstream projects to make 
>> all
>> this mimedata mesh together perfectly to produce ideal default behaviour.
>
> Right, so I think the immediate course of action here would be to patch
> GIMP’s MIME data so that it does not register as a PDF viewer.
>
> If we stumble upon other issues like that, we can fix them similarly.
>
> How does that sound?
>
Well, in my interpretation, the mime data just says that it's can handle PDF's, 
not necessarily that it's at PDF reader. If a PDF is opened with Gimp, it shows 
an interface for importing it as images, so I don't feel like it's a mistake 
for Gimp to mark it's self as being able to handle PDF's. If we make actual PDF 
readers have priority over Gimp somehow, Gimp will still be under the list of 
suggested applications when one right clicks on a *.pdf file in a file manager, 
but making this change would completely remove Gimp as an option. 

From the perspective of Gimp developers, they have no power to make Gimp's 
mimedata cause ideal behaviour on, because mimedata is simply not very 
versatile, so listing Gimp as being able to handle application/pdf isn't a 
mistake on their part.

The best solution might be to create mimeapps.list files that take precedence 
over mimeinfo.cache. I'm not sure which package it should go in though.

Packaging goldendict with support for optionally installed dictionaries

2017-10-28 Thread Brendan Tildesley
I'm working on packaging goldendict, a dictionary reader, along with
many free dictionaries in various languages. This essentially requires
"optional dependencies", a concept alien to Guix's functional model.
However some by default goldendict checks directories such as
/usr/share/stardict/dicfor dictionaries, but Guix has 2 other locations
dictionaries may be found; /run/current-system/profile/share/..., and
$GUIX_PROFILE/share/...
A couple packages like ibus and aspell solve this using
'native-search-paths' which seems to require the program to have an
environment variable it checks for search paths, which goldendict
doesn't. There isn't much documentation on native-search-paths so I
don't know what it actually does.
libxt has a patch that hard codes the rule to check
/run/current-system/profile, and if GUIX_PROFILE exists, check that,
otherwise if HOME exists check $HOME/.guix-profile/...
That's the only solution I can see working unless anyone has a better
suggestion, I'd like to ask for some help writing the patch though since
I've never written any C/C++ before, I was stuck figuring out how to
define a string :(.

I think it can be done by making a copy of this code block and wrapping
it in the above logic:
https://github.com/goldendict/goldendict/blob/master/config.cc#L335
It would be good to keep the original /usr/share search paths so that
goldendict will interoperate if guix is installed on a foreign distro.




Re: Packaging mathjax and other javascript libraries

2017-05-28 Thread Brendan Tildesley
Ricardo Wurmus 於 2017-05-26 18:17 寫道:
> Arun Isaac  writes:
>
> [...]
> I would be in favour of doing it the Debian way.  It’s difficult to draw
> a line between a web application and a JavaScript library, so I’d rather
> not have to make a decision like that each time we package something
> written in JavaScript.
>
>> Should we have any prefix in the package name for javascript libraries
>> such as mathjax? Apparently, Debian uses the "libjs-" prefix. Also, it
>> might be a good idea to have a separate file
>> (gnu/packages/javascript.scm) for these javascript libraries.
> So far we have separated packages according to their purpose.  There are
> a few exceptions, such as python.scm, which would best be split up.  If
> possible I’d rather have JavaScript libraries in modules that indicate
> what their purpose is.  General purpose frameworks, on the other hand,
> could very well fit in a javascript.scm.
>
I also wondered if mathjax should be broken up into js-mathjax and
font-mathjax, since it is 180MiB or so. Some distros even just delete
some of the fonts.




Re: What’s next?

2017-05-24 Thread Brendan Tildesley
Ludovic Courtès 於 2017-05-24 23:11 寫道:
> Hello Guix!
>
> I think it’s time to think about what we want to work on next, ideally
> before the next release, and ideally said release should be in a couple
> of months rather than in 5 months.  Here are some important items I can
> think of:
[...]
> I think the key idea is that we should fix all the annoyances and bugs,
> many of which seasoned Guix hackers more or less got used to, but which
> are nevertheless a serious hindrance when using Guix “normally.”
>
> Ludo’.

One little annoyance I have is that guix takes every opportunity to
update the list of substitutes when guix build, guix package -u, etc...
is run, and fills my terminal with output like:

substitute: updating list of substitutes from
'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from
'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from
'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from
'https://mirror.hydra.gnu.org'... 100.0%
...

It will output this line a different number each time based on some rule
I couldn't guess, and renders the percentage measurement meaningless.
Currently I am running `guix system init config.scm
--substitute-urls="http://10.1.1.61:8080 https://mirror.hydra.gnu.org/;
--fallback' from the 0.13 installer, and it his been outputting hundreds
of these lines for the last half an hour. I'm not sure if it is ever
going to stop, perhaps I've stumbled across a genuine bug? In any case,
the minor annoyance version is something I've noticed for a while.




Re: Open Government Data License & CC-BY 4.0

2017-04-25 Thread Brendan Tildesley
ng0 於 2017-04-25 17:47 寫道:
>
> CC-BY 3.0 is in Guix. Unless something fundamental changed in 4.0, 4.0
> should be okay to add in the variants which are not CC-BY-NC.
>
> Licenses can be added in guix/licenses.scm
Well the license seems to be compatible with CC-BY 4.0 because it
explicitly states so in clause 4.2. Or is it compatible as a matter of
fact and that clause is simply pointing it out, and so it may also be
compatible with CC-BY 3.0? When we assign a license in a Guix package
definition, my understanding is that this is a statement saying
effectively "If you look in the source tar.gz, you will see that this
package is in fact licensed under ... license, perhaps in the COPYING
file". If I set the license to CC-BY 4.0, would that be claiming the
Taiwanese government has issued the font under that license. Does clause
4.2 mean "You can redistribute this under CC-BY 4.0 with your name on
it, if you want" or "We grant you this under the CC-BY 4.0". I'm not
even sure if that is a meaningful distinction in copyright law. If the
former is actually correct, does this require me as a Guix dev to add a
COPYING file distributing the font under CC-BY 4.0 under my name or
what? Can I say truthfully that the source .zip file containing the
fonts is under the CC-BY 4.0 ?



Open Government Data License & CC-BY 4.0

2017-04-25 Thread Brendan Tildesley
I would like to package the cns-11643 fonts published at
http://data.gov.tw/node/5961 , however the license (
http://data.gov.tw/license ) is the Open Government Data License
published by the Taiwanese government, and is not available in Guix.

According to

https://discuss.okfn.org/t/license-approval-request-open-government-data-license-taiwan-1-0/4593

and the license it's self (clause 4.2) The license is compatible with
the CC-BY 4.0 license, although that is not in Guix either it seems. I
do not understand the legalities, but it seems that this license is only
really usable in Taiwan, and so we should use the CC-BY 4.0 instead.

This is how debian has set their license file:
http://metadata.ftp-master.debian.org/changelogs/main/f/fonts-cns11643/fonts-cns11643_98.1+20150923-2_copyright

In any case, I find it all rather perplexing. What is the appropriate
way to deal with this in Guix and how should this package's (license
...) be set?




Re: [PATCH 3/3] gnu: Duplicity: Update to 0.7.10

2016-09-22 Thread Brendan Tildesley
Eric Bavier 於 2016-09-21 05:25 寫道:
> [...]
> Let's leave out the nnecessary whitespace changes.
>
> Could you send an updated patch?
> Thanks,
> `~Eric

Ok, I remade it all to look like I didn't just rewrite everything from
scratch, and added the incorrect indentation back in. Seems odd to
prefer keeping the patch small over fixing indentation.

>From 15721c677f20156071fe0efb150b3af63f64648c Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Tue, 20 Sep 2016 20:41:30 +1000
Subject: [PATCH 1/3] gnu: duplicity: Update to 0.7.10.

* gnu/packages/backup.scm (duplicity): Update to 0.7.10.
[source]: Remove duplicity-piped-password.patch.
[source]: Remove duplicity-test_selection-tmp.patch.
* gnu/local.mk (dist_patch_DATA): Removed above patch file entries.
---
 gnu/local.mk |  2 --
 gnu/packages/backup.scm  | 15 +++
 gnu/packages/patches/duplicity-piped-password.patch  | 20 
 .../patches/duplicity-test_selection-tmp.patch   | 18 --
 4 files changed, 7 insertions(+), 48 deletions(-)
 delete mode 100644 gnu/packages/patches/duplicity-piped-password.patch
 delete mode 100644 gnu/packages/patches/duplicity-test_selection-tmp.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a756638..2445172 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -488,8 +488,6 @@ dist_patch_DATA =		\
   %D%/packages/patches/doc++-include-directives.patch		\
   %D%/packages/patches/doc++-segfault-fix.patch			\
   %D%/packages/patches/doxygen-test.patch			\
-  %D%/packages/patches/duplicity-piped-password.patch		\
-  %D%/packages/patches/duplicity-test_selection-tmp.patch	\
   %D%/packages/patches/elfutils-tests-ptrace.patch		\
   %D%/packages/patches/elixir-disable-failing-tests.patch	\
   %D%/packages/patches/einstein-build.patch			\
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index e77c4f2..0082676 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015 Eric Bavier <bav...@member.fsf.org>
 ;;; Copyright © 2014 Ian Denhardt <i...@zenhack.net>
 ;;; Copyright © 2015, 2016 Leo Famulari <l...@famulari.name>
+;;; Copyright © 2016 Brendan Tildesley <brendan.tildes...@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -51,7 +52,7 @@
 (define-public duplicity
   (package
 (name "duplicity")
-(version "0.6.26")
+(version "0.7.10")
 (source
  (origin
   (method url-fetch)
@@ -61,20 +62,17 @@
   version ".tar.gz"))
   (sha256
(base32
-"0jh79syhr8n3l81jxlwsmwm1pklb4d923m2lgqbswyavh1fqmvwb"))
-  (patches (search-patches "duplicity-piped-password.patch"
-   "duplicity-test_selection-tmp.patch"
+"0hj8451gpndyqdfxwhbxwr9ddxvc47g0iv003q33q5kda8ayyps8"
 (build-system python-build-system)
 (native-inputs
  `(("python2-setuptools" ,python2-setuptools)
+   ("python2-mock" ,python2-mock)
("util-linux" ,util-linux))) ;setsid command, for the tests
 (inputs
  `(("python" ,python-2)
("librsync" ,librsync)
-   ("mock" ,python2-mock)   ;for testing
("lockfile" ,python2-lockfile)
-   ("gnupg" ,gnupg-1)   ;gpg executable needed
-   ("util-linux" ,util-linux)   ;for setsid
+   ("gnupg" ,gnupg-1)
("tzdata" ,tzdata)))
 (arguments
  `(#:python ,python-2   ;setup assumes Python 2
@@ -82,7 +80,8 @@
#:phases (alist-cons-before
  'check 'check-setup
  (lambda* (#:key inputs #:allow-other-keys)
-   (substitute* "testing/functional/__init__.py"
+   (substitute* '("testing/functional/__init__.py"
+  "testing/overrides/bin/lftp")
  (("/bin/sh") (which "sh")))
(setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
(setenv "TZDIR"  ;some timestamp checks need TZDIR
diff --git a/gnu/packages/patches/duplicity-piped-password.patch b/gnu/packages/patches/duplicity-piped-password.patch
deleted file mode 100644
index db50f5d..000
--- a/gnu/packages/patches/duplicity-piped-password.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-This test, on three occasions, is failing with the error:
-
-  EOF: End Of File (EOF) in read_nonblocking(). Braindead platform.
-
 duplicity-0.6.24/testing/functional/test_final.py	2014-09-28 13:14:52.146001614 -0500
-+++ duplicity-0.6.24/testing/functional/test_final.py	2014-09-28

Re: [PATCH 2/2] gnu: Add qtox.

2016-09-21 Thread Brendan Tildesley
Andy Patterson 於 2016-09-15 05:30 寫道:
[...]
> +(arguments
> + '(#:phases
> +   (modify-phases %standard-phases
> + (replace 'configure
> +   (lambda* (#:key outputs #:allow-other-keys)
> + (zero?
> +  (system* "qmake"
> +   (string-append "PREFIX="
> +  (assoc-ref outputs "out"))
> + (add-after 'unpack 'fix-reproducibility-issues
> +   (lambda _
> + (substitute* "src/main.cpp"
> +   (("__DATE__") "\"\"")
> +   (("__TIME__") "\"\"")
> +   (("TIMESTAMP") "\"\""))
> + #t)
'unpack is before 'configure, so I think this should be put above
(replace 'configure. Also I noticed qmake outputs Makefile that contains
DTIMESTAMP= It doesn't look like it actually does anything though.
> +(home-page "https://qtox.github.io/;)
> +(synopsis "Tox chat client using Qt")
> +(description "qTox is a Tox client that follows the Tox design
> +guidelines.  It provides an easy to use application that allows you to
> +connect with friends and family without anyone else listening in.")
> +(license license:gpl3+)))
> +
>  (define-public pybitmessage
>(package
>  (name "pybitmessage")

I was able to compile and run, but the package technically failed with

builder for `/gnu/store/3qh6k8lixrkdxvd3zfvapc1fdwl079lv-qtox-1.5.1.drv'
failed to produce output path
`/gnu/store/j4yg5hd5giss2fpivzdkrdlzp62x4qbq-qtox-1.5.1'

I don't understand what produces this message. Can anyone explain. If I
use guix build qtox -K I can find the "failed" build in /tmp/ and run it.




[PATCH 3/3] gnu: Duplicity: Update to 0.7.10

2016-09-20 Thread Brendan Tildesley
May as well put my name on this now that I have 2 packages in
backup.scm. The test_selection patch is no longer needed, as the patch
is already in the code. The piped password-patch I'm less sure about. It
seemed to work fine without. Is this the kind of thing that would fail
on Hydra but not in a interactive terminal? Maybe it is needed.
>From 88a87a8c6ba19ba66f2a7cfb2efe9fd707d4d9e2 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Tue, 20 Sep 2016 20:41:30 +1000
Subject: [PATCH 3/3] gnu: Update duplicity.

* gnu/packages/backup.scm (duplicity): Update to 0.7.10.
* gnu/packages/patches/duplicity-piped-password.patch: Deleted.
* gnu/packages/patches/duplicity-test_selection-tmp.patch: Deleted.
---
 gnu/packages/backup.scm| 82 +-
 .../patches/duplicity-piped-password.patch | 20 --
 .../patches/duplicity-test_selection-tmp.patch | 18 -
 3 files changed, 47 insertions(+), 73 deletions(-)
 delete mode 100644 gnu/packages/patches/duplicity-piped-password.patch
 delete mode 100644 gnu/packages/patches/duplicity-test_selection-tmp.patch

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index e77c4f2..408389a 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015 Eric Bavier <bav...@member.fsf.org>
 ;;; Copyright © 2014 Ian Denhardt <i...@zenhack.net>
 ;;; Copyright © 2015, 2016 Leo Famulari <l...@famulari.name>
+;;; Copyright © 2016 Brendan Tildesley <brendan.tildes...@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,6 +34,7 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages ftp)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
@@ -51,53 +53,63 @@
 (define-public duplicity
   (package
 (name "duplicity")
-(version "0.6.26")
+(version "0.7.10")
 (source
  (origin
-  (method url-fetch)
-  (uri (string-append "https://code.launchpad.net/duplicity/;
-  (version-major+minor version)
-  "-series/" version "/+download/duplicity-"
-  version ".tar.gz"))
-  (sha256
-   (base32
-"0jh79syhr8n3l81jxlwsmwm1pklb4d923m2lgqbswyavh1fqmvwb"))
-  (patches (search-patches "duplicity-piped-password.patch"
-   "duplicity-test_selection-tmp.patch"
+   (method url-fetch)
+   (uri (string-append "https://code.launchpad.net/duplicity/;
+   (version-major+minor version)
+   "-series/" version "/+download/duplicity-"
+   version ".tar.gz"))
+   (sha256
+(base32
+ "0hj8451gpndyqdfxwhbxwr9ddxvc47g0iv003q33q5kda8ayyps8"
 (build-system python-build-system)
 (native-inputs
  `(("python2-setuptools" ,python2-setuptools)
-   ("util-linux" ,util-linux))) ;setsid command, for the tests
+   ("python2-mock" ,python2-mock)
+   ("util-linux" ,util-linux))) ; setsid command, for the tests
 (inputs
  `(("python" ,python-2)
("librsync" ,librsync)
-   ("mock" ,python2-mock)   ;for testing
-   ("lockfile" ,python2-lockfile)
-   ("gnupg" ,gnupg-1)   ;gpg executable needed
-   ("util-linux" ,util-linux)   ;for setsid
-   ("tzdata" ,tzdata)))
+   ("python2-lockfile" ,python2-lockfile)
+   ("python2-pexpect" ,python2-pexpect)
+   ("python2-paramiko" ,python2-paramiko)
+   ("python2-pycrypto" ,python2-pycrypto)
+   ("python2-botocore" ,python2-botocore)
+   ("python2-dropbox" ,python2-dropbox)
+   ("lftp" ,lftp)
+   ("gnupg" ,gnupg-1)
+   ("ncftp" ,ncftp)
+   ("tzdata" ,tzdata)
+   ("par2cmdline" ,par2cmdline)))
 (arguments
- `(#:python ,python-2   ;setup assumes Python 2
+ `(#:python ,python-2
#:test-target "test"
-   #:phases (alist-cons-before
- 'check 'check-setup
- (lambda* (#:key inputs #:allow-other-keys)
-   (substitute* "testing/functional/__init__.py"
- (("/bin/sh") (which "sh")))
-   (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
-   (setenv "TZDIR"  ;some timestamp checks need TZDIR
-   (s

[PATCH 2/3] gnu: Add python-dropbox

2016-09-20 Thread Brendan Tildesley

>From b76af9fa56ebd49147d91e9944281ea0da55a752 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Tue, 20 Sep 2016 20:07:31 +1000
Subject: [PATCH 2/3] gnu: Add python-dropbox.

* gnu/packages/python.scm (python-dropbox): New variable.
* gnu/packages/python.scm (python2-dropbox): New variable.
---
 gnu/packages/python.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 77fcdf6..d80e710 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10918,3 +10918,31 @@ and runtime type checkers, static analyzers, IDEs and other tools.")
 
 (define-public python2-typing
   (package-with-python2 python-typing))
+
+(define-public python-dropbox
+  (package
+(name "python-dropbox")
+(version "6.8.0")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "dropbox" version))
+   (sha256
+(base32
+ "0csd2mgsppmfw66c8mk0309p9w05wnqisqsn0qaqmcxygq156nhi"
+(build-system python-build-system)
+(native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+(inputs
+ `(("python-requests" ,python-requests)
+   ("python-six" ,python-six)
+   ("python-urllib3" ,python-urllib3)))
+(propagated-inputs
+ `(("python-typing" ,python-typing)))
+(home-page "http://www.dropbox.com/developers;)
+(synopsis "Official Dropbox API Client")
+(description "Python SDK for integrating with the Dropbox API")
+(license license:expat)))
+
+(define-public python2-dropbox
+  (package-with-python2 python-dropbox))
-- 
2.9.3



[PATCH 1/3] gnu: Add python-typing

2016-09-20 Thread Brendan Tildesley

>From 3536a1cecbd10a499b1a76c34b7cd7b1b11c5f61 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Tue, 20 Sep 2016 19:45:28 +1000
Subject: [PATCH 1/3] gnu: Add python-typing.

* gnu/packages/python.scm (python-typing): New variable.
* gnu/packages/python.scm (python2-typing): New variable.
---
 gnu/packages/python.scm | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 96589fc..77fcdf6 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10891,3 +10891,30 @@ with an associated set of resolve methods that know how to fetch data.")
 provide extendible implementations of common aspects of a cloud so that you can
 focus on building massively scalable web applications.")
 (license license:expat)))
+
+(define-public python-typing
+  (package
+(name "python-typing")
+(version "3.5.2.2")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append (pypi-uri "typing" version)))
+   (sha256
+(base32
+ "0bvpqkmrnl5qs5491yb4irrkd8sha84g6xy8cclp3bsk4qlk9kib"
+(build-system python-build-system)
+(inputs
+ `(("python-setuptools" ,python-setuptools)))
+(arguments
+ `(#:tests? #f)) ; no setup.py test
+(home-page "https://docs.python.org/3.5/library/typing.html;)
+(synopsis "Type Hints for Python")
+(description "Typing defines a standard notation for Python function and
+variable type annotations.  The notation can be used for documenting code in a
+concise, standard format, and it has been designed to also be used by static
+and runtime type checkers, static analyzers, IDEs and other tools.")
+(license license:psfl)))
+
+(define-public python2-typing
+  (package-with-python2 python-typing))
-- 
2.9.3



[PATCH 0/3] gnu: Duplicity: Update to 0.7.10

2016-09-20 Thread Brendan Tildesley
Hi, I've been working on an update for Duplicity. Updating duplicity its
self was easy, but I also tried adding some more backend support. I was
able to get python-dropbox working although it may not be packaged
properly, for example, the documentation seems to be on readthedocs.org
but not in the package? Python-six claims to be required, but It doesn't
look like any tests are even run by default. Strangely, I could not find
the same package in debian's repository. What's up with that? I found it
in Archlinux's repo for comparison. Note that this is not the
proprietary Dropbox program and that is not required by python-dropbox.
I also tried packaging python2-gdata but that was a disaster. It hasn't
been updated in a year or two ago, possibly obsolete? I can't package
these backends well when I don't even use them, so I was wondering there
was anyone around interested in packaging them. Regardless, this
provides a much needed upgrade from the obsolete 0.6.x series of
Duplicity that can be used without any such backend.

https://packages.debian.org/search?suite=all=all=any=names=dropbox

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/python-dropbox




Re: [PATCH 2/2] gnu: python: Add i3-quickswitch.

2016-09-19 Thread Brendan Tildesley
Leo Famulari 於 2016-09-16 15:46 寫道:
> On Wed, Sep 14, 2016 at 11:17:24AM +0200, Ivan Vilata i Balaguer wrote:
>> Subject: [PATCH 2/2] gnu: python: Add i3-quickswitch.
>>
>> * gnu/packages/python.scm (i3-quickswitch): New variable.
> Cool, this works :)
>
>> +(define-public i3-quickswitch
>> +  (package
>> +(name "i3-quickswitch")
> Again, I think that we should stay closer to the upstream name, in this
> case "quickswitch-for-i3".
I'm not a fan of "quickswitch-for-i3" and "python-i3-py". Perhaps a
better solution is to ensure "i3-py" in the description or synopsis so
that `guix package -s' finds it. As for quickswitch, isn't the upstream
name also simply "quickswitch-i3"?
>> +(build-system python-build-system)
> Also again, it would be nice to include README.rst.





Re: [PATCH 2/2] gnu: python: Add i3-quickswitch.

2016-09-14 Thread Brendan Tildesley
On 2016-09-14 19:17, Ivan Vilata i Balaguer wrote:

Welcome to Guix. I tested this out in i3 and it works just fine. I may
end up using it. the latest version seems to be 2.2, but I see you
commented on that on the github, as it is not in pypi yet. Do we prefer
to use pypi or directly source upstream for packages? With 80k+ packages
in pypi, I'm unsure. Someone else will need to review this as I don't
have commit access.




Re: [PATCH 1/2] gnu: python: Add python-i3.

2016-09-14 Thread Brendan Tildesley
On 2016-09-14 19:16, Ivan Vilata i Balaguer wrote:

This is version 0.6.4, but the git repo has a few small updates since
then, and has bumbed the version to 0.6.5. Being 4 years old, probably
this is not going to find it's way to pypi? Other than that I can't see
issues with the package. Perhaps it is not significant to matter?




Re: [PATCH] gnu: par2cmdline.

2016-09-13 Thread Brendan Tildesley
On 2016-09-13 22:09, Ludovic Courtès wrote:
> Hello,
>
> Just a quick note:
>
> Brendan Tildesley <brendan.tildes...@openmailbox.org> skribis:
>
>> +   license:gpl3+  ; config.guess
>> +   license:x11; install-sh
> These two files are build system helpers provided by Autoconf and
> Automake.  They are not installed so their license does not matter here.
>
> Ludo’.

Right, I didn't realise that.

>From d63c6af98129e0de3eb1054dd69496b99a269c99 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Tue, 13 Sep 2016 20:36:15 +1000
Subject: [PATCH] gnu: Add par2cmdline.

* gnu/packages/backup.scm (par2cmdline): New variable.
---
 gnu/packages/backup.scm | 37 +
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 4678b9b..e77c4f2 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -28,6 +28,7 @@
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages acl)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
@@ -99,6 +100,42 @@ uses GnuPG to encrypt and/or sign these archives, they will be safe from
 spying and/or modification by the server.")
 (license license:gpl2+)))
 
+(define-public par2cmdline
+  (package
+(name "par2cmdline")
+(version "0.6.14")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/Parchive/par2cmdline/archive/v;
+  version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0ykfb7ar0x0flfdgf6i8xphyv5b93dalbjj2jb6hx7sdjax33n1g"))
+  ;; This test merely needs a file to test recovery on, but
+  ;; /dev/random is essentially /dev/urandom plus minimum entropy
+  ;; locking, making the test hang indefinitely. This change is
+  ;; already upstream: remove on upgrade to future 0.6.15.
+  ;; https://github.com/Parchive/par2cmdline/commit/27723a678f780da82c79b98592592009c779a4fb
+  (modules '((guix build utils)))
+  (snippet
+   '(substitute* "tests/test20" (("if=/dev/random") "if=/dev/urandom")
+(native-inputs
+ `(("automake" ,automake)
+   ("autoconf" ,autoconf)))
+(build-system gnu-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'autoreconf
+   (lambda _ (zero? (system* "autoreconf" "-vfi")))
+(synopsis "File verification and repair tool")
+(description "Par2cmdline is a tool for generating RAID-like PAR2 recovery
+files using Reed-Solomon coding.  PAR2 files can be stored along side backups
+or distributed files for recovering from bitrot.")
+(home-page "https://github.com/Parchive/par2cmdline;)
+(license license:gpl3+)))
+
 (define-public hdup
   (package
 (name "hdup")
-- 
2.9.3



Re: [PATCH] gnu: par2cmdline.

2016-09-13 Thread Brendan Tildesley
Ok thanks I'd forgotten to fix the text. I ended up deciding to move the
definition to backup.scm as it makes more sense, and my duplicity 7.0.10
package uses par2cmdline which is also in backup.scm
>From 8c3187a876c142acde5eb6cb0dc22c0699765a23 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Tue, 13 Sep 2016 20:36:15 +1000
Subject: [PATCH] gnu: Add par2cmdline.

* gnu/packages/backup.scm (par2cmdline): New variable.
---
 gnu/packages/backup.scm | 38 ++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 4678b9b..62d4341 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -28,6 +28,7 @@
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
   #:use-module (gnu packages acl)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages databases)
@@ -99,6 +100,43 @@ uses GnuPG to encrypt and/or sign these archives, they will be safe from
 spying and/or modification by the server.")
 (license license:gpl2+)))
 
+(define-public par2cmdline
+  (package
+(name "par2cmdline")
+(version "0.6.14")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/Parchive/par2cmdline/archive/v;
+  version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0ykfb7ar0x0flfdgf6i8xphyv5b93dalbjj2jb6hx7sdjax33n1g"))
+  ;; This test merely needs a file to test recovery on, but
+  ;; /dev/random is essentially /dev/urandom plus minimum entropy
+  ;; locking, making the test hang indefinitely. This change is
+  ;; already upstream: remove on upgrade to future 0.6.15.
+  ;; https://github.com/Parchive/par2cmdline/commit/27723a678f780da82c79b98592592009c779a4fb
+  (modules '((guix build utils)))
+  (snippet
+   '(substitute* "tests/test20" (("if=/dev/random") "if=/dev/urandom")
+(native-inputs
+ `(("automake" ,automake)
+   ("autoconf" ,autoconf)))
+(build-system gnu-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'autoreconf
+   (lambda _ (zero? (system* "autoreconf" "-vfi")))
+(synopsis "File verification and repair tool")
+(description "Par2cmdline is a tool for generating RAID-like PAR2 recovery
+files using Reed-Solomon coding.  PAR2 files can be stored along side backups
+or distributed files for recovering from bitrot.")
+(home-page "https://github.com/Parchive/par2cmdline;)
+(license (list license:gpl3+  ; *
+   license:x11; install-sh
+
 (define-public hdup
   (package
 (name "hdup")
-- 
2.9.3



[PATCH] gnu: par2cmdline.

2016-09-12 Thread Brendan Tildesley

>From 0bb6fe510ce6a6c1cd0851527909db16b167d703 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Mon, 12 Sep 2016 16:02:27 +1000
Subject: [PATCH] gnu: Add par2cmdline.

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

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 27ab7a6..d1dabca 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -28,6 +28,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages gettext)
@@ -45,6 +46,47 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages xml))
 
+(define-public par2cmdline
+  (package
+(name "par2cmdline")
+(version "0.6.14")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/Parchive/par2cmdline/archive/v;
+  version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32
+"0ykfb7ar0x0flfdgf6i8xphyv5b93dalbjj2jb6hx7sdjax33n1g"))
+  ;; This test merely needs a file to test recovery on, but
+  ;; /dev/random is essentially /dev/urandom plus minimum entropy
+  ;; locking, making the test hang indefinitely. This change is
+  ;; already upstream: remove on upgrade to future 0.6.15.
+  (modules '((guix build utils)))
+  (snippet
+   '(substitute* "tests/test20" (("if=/dev/random") "if=/dev/urandom")
+(native-inputs
+ `(("automake" ,automake)
+   ("autoconf" ,autoconf)))
+(build-system gnu-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'aclocal
+   (lambda _ (zero? (system* "aclocal"
+ (add-after 'aclocal 'automake
+   (lambda _ (zero? (system* "automake" "--add-missing"
+ (add-after 'automake 'autoconf
+   (lambda _ (zero? (system* "autoconf")))
+(synopsis "File verification and repair tool")
+(description "Par2cmdline is a tool for generating RAID-like PAR2 recovery
+files a fraction the size their of using Reed-Solomon coding.  PAR2 files can
+be stored along side backup or published files for recovering from bitrot.")
+(home-page "https://github.com/Parchive/par2cmdline;)
+(license (list license:gpl2+  ; *
+   license:gpl3+  ; config.guess
+   license:x11; install-sh
+
 (define-public parted
   (package
 (name "parted")
-- 
2.10.0



Re: [PATCH] gnu: icecat: correct useragent to GNU GuixSD.

2016-09-10 Thread Brendan Tildesley
On 2016-09-10 19:18, Jan Nieuwenhuizen wrote:
> Hi!
>
> Attached simple patch fixes spreading of theh terribly ignoring lie that
> I would be running Windows NT.
>
> I'm probably displayng unimaginable ignorance here but it's beyond me
> why a project like Firefox would hardcode such a default.
>
The user agent is a string that is freely provided to websites when you
connect. Changing the default user agent in Guix's Icecat to Guix means
that all Guix Icecat users will suddenly be identifiable by this datum,
and automated surveillance networks will pick this up, bulking our
browsing behaviour with other instances of the same  user id, using that
to serve up advertising to us on sites or whatever, I haven't really
read much on this.
This is the current Icecat user string followed by the user string of my
version of Tor browser:

Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Firefox/38.0
Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0

If we had Icecat 45 already, we would be helping Tor users be less
trackable, but as you can see, just 4 characters are different, which is
all that is needed to break anonymity. Perhaps there are still some
people using Tor Browser 38 that we are assisting, but I suspect not
many. I can't see how the version number would affect website behaviour
realistically, so perhaps we could maintain our instance of Icecat
patched with the latest Tor user agent instead, in order to assist Tor
users? On the other hand it is kinda *bleh* to be advertising myself as
a Windows user, skewing statistics, so It'd be nice to have a Linux,
GNU/Linux, or Guix user agent, so that published OS usage statistics
will display our mighty existence! User agents being changeable is
meaningless unless there is at least one large cluster of users with
some arbitrary string that can be chosen to hide with, so there may be
greater value in keeping "Windows NT". I'm not sure, what do others think?



Re: [PATCH] gnu: Add libicns

2016-09-03 Thread Brendan Tildesley
On 2016-09-04 04:59, Marius Bakke wrote:
> Brendan Tildesley <brendan.tildes...@openmailbox.org> writes:
>
>> On 2016-09-03 22:38, Marius Bakke wrote:
>>> Marius Bakke <mba...@fastmail.com> writes:
>>>
>>>> Additionally this package bundles "m4" even if it doesn't use it. Can
>>>> you remove it with a "origin" snippet? See e.g. "xcb-util-xrm" for how
>>>> that's done.
>>> My mistake, it does appear to use those files, and it's not actually m4.
>>> I think using the generated libtool is probably OK.
>>>
>>> Alternatively it can be re-generated by adding a phase that invokes
>>> "autoreconf -vif". I'm not actually sure if this is desired, so just
>>> leave it for now.
>>>
>>> Thank you,
>>> Marius
>> Ah, well that lost me a bit of time.
> Sorry about that! Now it re-generates libtool and friends, so it doesn't
> hurt, at least. I only have a couple of remarks, and then someone with
> commit access can take a final glance.
>
>> From b04ad5e40ac5befe30832ffbcf3b4283b4ae1d63 Mon Sep 17 00:00:00 2001
>> From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
>> Date: Sat, 3 Sep 2016 05:53:56 +1000
>> Subject: [PATCH] gnu: Add libicns.
>>
>> * gnu/packages/image.scm (libicns): New variable.
>> ---
>>  gnu/packages/image.scm | 40 
>>  1 file changed, 40 insertions(+)
>>
>> diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
>> index 4fdc4ae..1b21306 100644
>> --- a/gnu/packages/image.scm
>> +++ b/gnu/packages/image.scm
>> @@ -48,6 +48,7 @@
>>#:use-module (guix download)
>>#:use-module (guix build-system gnu)
>>#:use-module (guix build-system cmake)
>> +  #:use-module (guix utils)
> I don't think this is required.
>
>>#:use-module (srfi srfi-1))
>>  
>>  (define-public libpng
>> @@ -147,6 +148,45 @@ maximum quality factor.")
>> (license license:gpl2+)
>> (home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim;)))
>>  
>> +(define-public libicns
>> +  (package
>> +(name "libicns")
>> +(version "0.8.1")
>> +(source (origin
>> + (method url-fetch)
>> + (uri (string-append
>> +   "mirror://sourceforge/icns/libicns-" version ".tar.gz"))
>> + (sha256 (base32
>> +  
>> "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"
>> +(build-system gnu-build-system)
>> +(inputs
>> + `(("libpng" ,libpng-1.2)
> It built fine with the latest libpng, is there a specific reason to use
> this version?
>
I just notice the configure script wasn't looking for any newer version.
I was using icns2png to
extract png file, but probably wasn't utilising libpng to do this? as
you can see it is built without
support for larger icons, but I never used that feature. This is old
software that hasn't been
updated since 2012. Perhaps it could be made to work but I wouldn't know
myself. Depends on the
standards of Guix developers.

checking libpng/png.h usability... no
checking libpng/png.h presence... no
checking for libpng/png.h... no
checking libpng10/png.h usability... no
checking libpng10/png.h presence... no
checking for libpng10/png.h... no
checking libpng12/png.h usability... yes
checking libpng12/png.h presence... yes
checking for libpng12/png.h... yes
checking for jas_init in -ljasper... no
checking for opj_setup_decoder in -lopenjpeg2... no
checking for opj_setup_decoder in -lopenjpeg... no
configure: WARNING: libopenjpeg or libjasper jp2000 codec libraries not
found
configure: WARNING: libicns will be built without 256x256 and 512x512
support

>
> The rest of the patch looks good to me.
>
> Thanks again!
> Marius

Thanks. If I posted a fix, I'd just end up making some new mistakes, so
I'll just leave it to be added!




Re: Feedback, ideas, discussion: tracking patches, discussions, bugs.

2016-09-03 Thread Brendan Tildesley
On 2016-09-04 02:55, David Craven wrote:
>> Today was pretty much an E-mail overload on the ML. In itself amazing :)
> I agree. If you aren't a full time guix developer it's hard to keep
> up. The only way I can keep up is by marking the emails I'm not
> interested in quickly as read =P Just reading all emails is a time
> commitment in itself...
>
I was going to post a patch over several files removing redundant
mkdir-p expressions,

but decided against it! If you run something like  `ack '\(install-file'
-B 7| ack  'mkdir-p' -A 7'

You can see them, since install-file already contains a mkdir-p. Also It
seems like

(let ((out  (assoc-ref outputs "out")))...) is set in almost every
package definition,

as if having some symbol for the outputs already might be more efficient??





Re: [PATCH] gnu: Add libicns

2016-09-03 Thread Brendan Tildesley
On 2016-09-03 22:38, Marius Bakke wrote:
> Marius Bakke <mba...@fastmail.com> writes:
>
>> Additionally this package bundles "m4" even if it doesn't use it. Can
>> you remove it with a "origin" snippet? See e.g. "xcb-util-xrm" for how
>> that's done.
> My mistake, it does appear to use those files, and it's not actually m4.
> I think using the generated libtool is probably OK.
>
> Alternatively it can be re-generated by adding a phase that invokes
> "autoreconf -vif". I'm not actually sure if this is desired, so just
> leave it for now.
>
> Thank you,
> Marius

Ah, well that lost me a bit of time. Anyway, this update should work
just fine. It was reproducible for me too.

>From b04ad5e40ac5befe30832ffbcf3b4283b4ae1d63 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Sat, 3 Sep 2016 05:53:56 +1000
Subject: [PATCH] gnu: Add libicns.

* gnu/packages/image.scm (libicns): New variable.
---
 gnu/packages/image.scm | 40 
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 4fdc4ae..1b21306 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -48,6 +48,7 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix utils)
   #:use-module (srfi srfi-1))
 
 (define-public libpng
@@ -147,6 +148,45 @@ maximum quality factor.")
(license license:gpl2+)
(home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim;)))
 
+(define-public libicns
+  (package
+(name "libicns")
+(version "0.8.1")
+(source (origin
+ (method url-fetch)
+ (uri (string-append
+   "mirror://sourceforge/icns/libicns-" version ".tar.gz"))
+ (sha256 (base32
+  "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"
+(build-system gnu-build-system)
+(inputs
+ `(("libpng" ,libpng-1.2)
+   ("jasper" ,jasper)))
+(native-inputs
+ `(("autoconf" ,autoconf)
+   ("automake" ,automake)
+   ("libtool" ,libtool)))
+(arguments
+ ;; no tests
+ `(#:tests? #f
+   #:phases
+   (modify-phases %standard-phases
+ (add-before 'configure 'autoconf
+   (lambda _
+ (zero? (system* "autoreconf" "-vfi")))
+(home-page "http://icns.sourceforge.net/;)
+(synopsis "Library for handling Mac OS icns resource files")
+(description
+ "Libicns is a library for the manipulation of Mac OS IconFamily resource
+type files (ICNS).  @command{icns2png} and @command{png2icns} are provided to
+convert between PNG and ICNS. @command{icns2png} will extract image files from
+ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
+with .desktop files.  Additionally, @Command{icontainer2png} is provided for
+extracting icontainer icon files.")
+(license (list license:lgpl2.1+ ; libicns
+   license:lgpl2.0+ ; src/apidocs.*
+   license:gpl2+; icns2png, png2icns, icontainer2png
+
 (define-public libtiff
   (package
(name "libtiff")
-- 
2.9.3



[PATCH] gnu: Add libicns

2016-09-02 Thread Brendan Tildesley

>From 64ca4155a754a93b26a1002185950f49469197f3 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Sat, 3 Sep 2016 05:53:56 +1000
Subject: [PATCH] gnu: Add libicns

* gnu/packages/image.scm (libicns): New variable
---
 gnu/packages/image.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 4fdc4ae..7f1d237 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -147,6 +147,34 @@ maximum quality factor.")
(license license:gpl2+)
(home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim;)))
 
+(define-public libicns
+  (package
+(name "libicns")
+(version "0.8.1")
+(source (origin
+ (method url-fetch)
+ (uri (string-append
+   "https://sourceforge.net/projects/icns/files/libicns-;
+   version ".tar.gz/download"))
+ (file-name (string-append "libicns-" version ".tar.gz"))
+ (sha256 (base32
+  "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"
+(build-system gnu-build-system)
+(arguments
+ ;; no tests
+ '(#:tests? #f))
+(inputs `(("libpng" ,libpng)
+  ("jasper" ,jasper)))
+(home-page "http://icns.sourceforge.net/;)
+(synopsis "Library for handling Mac OS icns resource files")
+(description
+ "libicns is a library for the manipulation of Mac OS IconFamily resource
+type files (ICNS).  icns2png and png2icns are provided to convert between PNG
+and ICNS. icns2png will extract image files from ICNS files under names like
+\"Foo_48x48x32.png\" useful for installing for use with .desktop files.")
+(license (list license:lgpl2.1+  ; libicns
+   license:gpl2+ ; icns2png, png2icns, icontainer2png
+
 (define-public libtiff
   (package
(name "libtiff")
-- 
2.9.3



[PATCH] gnu: Add libicns

2016-09-02 Thread Brendan Tildesley

>From 64ca4155a754a93b26a1002185950f49469197f3 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Sat, 3 Sep 2016 05:53:56 +1000
Subject: [PATCH] gnu: Add libicns

* gnu/packages/image.scm (libicns): New variable
---
 gnu/packages/image.scm | 28 
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 4fdc4ae..7f1d237 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -147,6 +147,34 @@ maximum quality factor.")
(license license:gpl2+)
(home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim;)))
 
+(define-public libicns
+  (package
+(name "libicns")
+(version "0.8.1")
+(source (origin
+ (method url-fetch)
+ (uri (string-append
+   "https://sourceforge.net/projects/icns/files/libicns-;
+   version ".tar.gz/download"))
+ (file-name (string-append "libicns-" version ".tar.gz"))
+ (sha256 (base32
+  "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"
+(build-system gnu-build-system)
+(arguments
+ ;; no tests
+ '(#:tests? #f))
+(inputs `(("libpng" ,libpng)
+  ("jasper" ,jasper)))
+(home-page "http://icns.sourceforge.net/;)
+(synopsis "Library for handling Mac OS icns resource files")
+(description
+ "libicns is a library for the manipulation of Mac OS IconFamily resource
+type files (ICNS).  icns2png and png2icns are provided to convert between PNG
+and ICNS. icns2png will extract image files from ICNS files under names like
+\"Foo_48x48x32.png\" useful for installing for use with .desktop files.")
+(license (list license:lgpl2.1+  ; libicns
+   license:gpl2+ ; icns2png, png2icns, icontainer2png
+
 (define-public libtiff
   (package
(name "libtiff")
-- 
2.9.3



Re: [PATCH] gnu: Add praat

2016-09-02 Thread Brendan Tildesley
On 2016-09-02 22:20, Ludovic Courtès wrote:
> [...]
>
>> + (add-after 'unpack 'be-timeless
>> +   (lambda _
>> + (substitute* "external/portaudio/pa_front.c"
>> +   ((" \\(built \" __DATE__  \" \" __TIME__ \"\\)") ""))
>> + #t))
> Could you move it to a ‘snippet’ in the ‘origin’ form?  (See the
> ‘squeak-vm’ package for an example.)
>
Sure.
> As Alex Griffin wrote, we should remove all of external/ in ‘snippet’
> (see item #9 about “bundling” at
> ),
> and instead add GSL, GLPK, FLAC, etc. as ‘inputs’ of the package.
>
> Would you like to try it?
>
> I think this is the only remaining blocker here.
>
> Thank you for your work!
>
> Ludo’.

I don't have any issue with this per se, but I haven't the slightest
clue how to due it. Praat Has no configure script, rather it just has a
make file that compiles everything into a single binary. is the code in
FLAC the same as the flac package?? How would I go about making these
external packages? Also I'm wondering how to go about adding an icon and
.desktop file supporting internationalisation. It seems upstream should
do this but they haven't so the package is nothing like a standard GNU
program. Is it possible to do all this without learning C?




Re: [PATCH] gnu: Add praat

2016-09-01 Thread Brendan Tildesley
Please discard the first patch and consider this updated version. I was
able to identify a timestamp and remove it, make the build reproducible.
Also, I have added all the licenses to the best of my ability, by which
I mean I ripped off the debian package. Praat looks messy but it's fun
software. For example, you if you are learning a tonal language, you can
import recordings to have it show the contours and see how they differ
from the idealised textbook versions (quite a lot!) --
http://www.sinosplice.com/life/archives/2008/01/21/seeing-the-tones-of-mandarin-chinese-with-praat
>From bdc94ded90345e67885a7aa3b7e649bc546ad22c Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Fri, 2 Sep 2016 03:28:58 +1000
Subject: [PATCH] gnu: Add praat

* gnu/packages/linguistics.scm (praat): New variable
---
 gnu/local.mk |   1 +
 gnu/packages/linguistics.scm | 111 +++
 2 files changed, 112 insertions(+)
 create mode 100644 gnu/packages/linguistics.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 5b90dfb..795a246 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -214,6 +214,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/libunwind.scm			\
   %D%/packages/libupnp.scm			\
   %D%/packages/links.scm			\
+  %D%/packages/linguistics.scm			\
   %D%/packages/linux.scm			\
   %D%/packages/lirc.scm\
   %D%/packages/lisp.scm\
diff --git a/gnu/packages/linguistics.scm b/gnu/packages/linguistics.scm
new file mode 100644
index 000..70a0d43
--- /dev/null
+++ b/gnu/packages/linguistics.scm
@@ -0,0 +1,111 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Brendan Tildesley <brendan.tildes...@openmailbox.org>
+;;;
+;;; 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 linguistics)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix utils)
+  #:use-module (guix download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages linux) ; for alsa-lib
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages pulseaudio))
+
+(define-public praat
+  (package
+(name "praat")
+(version "6.0.19")
+(source (origin
+  (method url-fetch)
+  (uri
+   (string-append
+"https://github.com/praat/praat/archive/v; version ".tar.gz"))
+  (file-name (string-append name "-" version ".tar.gz"))
+  (sha256
+   (base32 "1fhzqzygx5h6xkjaxwgzvnby393q7c3lby0fq3bnhscfdhzkm0a0"
+(build-system gnu-build-system)
+(native-inputs
+ `(("pkg-config" ,pkg-config)))
+(inputs
+ `(("gtk" ,gtk+-2)
+   ("alsa-lib" ,alsa-lib)
+   ("pulseaudio" ,pulseaudio)
+   ("python" ,python))) ; optional scripts
+(arguments
+ `(#:tests? #f
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'be-timeless
+   (lambda _
+ (substitute* "external/portaudio/pa_front.c"
+   ((" \\(built \" __DATE__  \" \" __TIME__ \"\\)") ""))
+ #t))
+ (add-before
+ 'build
+ 'copy-makefile
+   (lambda _
+ (copy-file "makefiles/makefile.defs.linux.pulse"
+"makefile.defs")
+ #t))
+ (replace
+ 'install
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(target (string-append out "/bin")))
+   (mkdir-p target)
+   (install-file "praat" target))
+ #t) 
+(home-page "http://www.praat.org;)
+(synopsis "Phonetics analysis program for linguists")
+(description
+ "According to its authors, praat is \"doing phonetics by
+computer\". T

[PATCH] gnu: Add praat

2016-08-30 Thread Brendan Tildesley
This marks my first attempt at writing a package definition for Guix.
Please assume it is broken since I still don't know what I'm doing, and
forgive me if you need to school me on things written in the manual. If
someone on GuixSD could test if it builds, load an audio file and see if
it plays correctly, that would be a good test. When I compiled it on
Parabola, it sets the wrong audio server by default so I had to change
it in settings to ALSA via PortAudio in the GUI. I'm interested to see
if it requires that on someone else's configuration too.


From 7c473fcf114e011ee4e11b766f0be82591ba2ac8 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <brendan.tildes...@openmailbox.org>
Date: Wed, 31 Aug 2016 01:13:18 +1000
Subject: [PATCH] gnu: Add praat

* gnu/packages/linguistics.scm (praat): New variable
---
 gnu/packages/linguistics.scm | 81

 1 file changed, 81 insertions(+)
 create mode 100644 gnu/packages/linguistics.scm

diff --git a/gnu/packages/linguistics.scm b/gnu/packages/linguistics.scm
new file mode 100644
index 000..40b38f8
--- /dev/null
+++ b/gnu/packages/linguistics.scm
@@ -0,0 +1,81 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Brendan Tildesley <brendan.tildes...@openmailbox.org>
+;;;
+;;; 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 linguistics)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix utils)
+  #:use-module (guix download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages linux) ; for alsa-lib
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages pulseaudio))
+
+(define-public praat
+  (package
+(name "praat")
+(version "6.0.19")
+(source
+ (origin
+   (method url-fetch)
+   (uri (string-append "https://github.com/praat/praat/archive/v;
version ".tar.gz"))
+   (file-name (string-append name "-" version ".tar.gz"))
+   (sha256
+(base32 "1fhzqzygx5h6xkjaxwgzvnby393q7c3lby0fq3bnhscfdhzkm0a0"
+(build-system gnu-build-system)
+(native-inputs
+ `(("pkg-config" ,pkg-config)))
+(inputs
+ `(("gtk" ,gtk+-2)
+   ("alsa-lib" ,alsa-lib)
+   ("pulseaudio" ,pulseaudio)
+   ("python" ,python))) ; optional scripts
+(arguments
+ `(#:tests? #f
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before
+  'build
+  'copy-makefile
+  ;; setup makefile for compiling on Linux as per README.md.
There may
+  ;; be issues with this. The audio config may need to be
changed in
+  ;; the GUI. If that is the case when tested on GuixSD, I'd
like to
+  ;; figure out how to patch praat to work by default.
+  (lambda _
+(copy-file "makefiles/makefile.defs.linux.pulse"
+   "makefile.defs")
+#t))
+ (replace
+  'install
+  (lambda* (#:key outputs #:allow-other-keys)
+(let* ((out (assoc-ref outputs "out"))
+   (target (string-append out "/bin")))
+  (mkdir-p target)
+  (install-file "praat" target))
+#t)
+(home-page "http://praat.org;)
+(synopsis "Doing phonetics by computer")
+(description
+ "Praat is a program for linguists to analyse, synthesize, and
manipulate
+speech, generate graphs for scientific papers, and more.")
+(license license:gpl2)))
-- 
2.9.3