Re: store reference detection (was Re: JARs and reference scanning)

2017-05-08 Thread Ricardo Wurmus

Chris Marusich  writes:

> There are probably many ways to accomplish that.  For example, in Java,
> perhaps we could implement a custom classloader.  Or maybe we could
> patch the built-in class loading mechanism [1].  Similarly, in Python
> there are also ways to customize the import mechanism [2].  Perhaps Perl
> also has a similar mechanism?

Jar files can be told to import classes from another Jar by adding it to
the “Class-Path” field of the Jar’s manifest.

Here’s an example:
https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html

I don’t know if this mechanism permits the use of absolute paths, but
it’s worth a try.  I should note that this doesn’t help with store
reference detection, because the manifest will be part of the compressed
Jar.  But if this works we could avoid propagation for Java packages.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




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

2017-05-08 Thread Efraim Flashner
On Thu, May 04, 2017 at 10:03:24PM -0500, Eric Bavier wrote:
> Hello Petter,
> 
...
> 
> I had to add $out/qml to the wrapper QML2_IMPORT_PATH in order for crt
> to start up.  I figured that was alright, since that path was present
> in your initial patch.
> 
...
>
> Thanks again,
> `~Eric
> 

I looked in gnu/packages/qt.scm, qtbase has QML2_IMPORT_PATH already set
in the native-search-paths, so my understanding was that wrapping the
program shouldn't be needed. Does it work without the wrapping?


-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: Multiple substitute servers question

2017-05-08 Thread Ludovic Courtès
Hi!

Maxim Cournoyer  skribis:

> I had this problem again now.
>
> guix package -i emacs-dvc
> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
> ;;;   newer than compiled 
> /home/maxim/.config/guix/latest/gnu/packages/emacs.go
> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
> ;;;   newer than compiled 
> /gnu/store/nqy9m6hhnkkfwr5wyq5bac96v9s9hc9i-guix-0.12.0-9.25a4/lib/guile/2.0/site-ccache/gnu/packages/emacs.go
> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
> ;;;   newer than compiled 
> /run/current-system/profile/lib/guile/2.0/site-ccache/gnu/packages/emacs.go
> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
> ;;;   newer than compiled 
> /home/maxim/.cache/guile/ccache/2.0-LE-8-2.0/home/maxim/src/guix/gnu/packages/emacs.scm.go
> The following package will be installed:
>emacs-dvctrunk-1.591 
> /gnu/store/sraxmg5qz9i4338s4ks7asgy4v68dgqs-emacs-dvc-trunk-1.591
>
> 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%
> Downloading 
> https://bayfront.guixsd.org/nar/gzip/6h7ym07plwxfn4zq53ld8zfpbx3a09al-at-spi2-core-2.22.0
>  (1.1MiB installed)...
> guix substitute: error: connect: No route to host
> killing process 13896
> killing process 13896: No such process

Oh I see.  ‘guix substitute --query’ (aka. “updating list of
substitutes”) correctly ignores the faulty machine, but ‘guix substitute
--substitute’ does not.  Could you email this issue to bug-guix?

> Q1: Why did it not fallback automatically to mirror.hydra.gnu.org, which
> pings, and instead aborted (no, hung) attempting to kill an
> (inexistant?) process? :)

I think the message is referring the ‘guix substitute’ process, but that
process exited after printing “error: connect”, and thus guix-daemon had
no process left to kill.

Thanks,
Ludo’.



Re: store reference detection (was Re: JARs and reference scanning)

2017-05-08 Thread Ludovic Courtès
Ricardo Wurmus  skribis:

> Chris Marusich  writes:
>
>> There are probably many ways to accomplish that.  For example, in Java,
>> perhaps we could implement a custom classloader.  Or maybe we could
>> patch the built-in class loading mechanism [1].  Similarly, in Python
>> there are also ways to customize the import mechanism [2].  Perhaps Perl
>> also has a similar mechanism?
>
> Jar files can be told to import classes from another Jar by adding it to
> the “Class-Path” field of the Jar’s manifest.

Likewise, Guile 2.2 uses ELF for its .go files.  It does not support
RUNPATH yet, but we could add support for it I suppose.

Ludo’.



Re: GuixSD bootable ISO-9669 image

2017-05-08 Thread Ludovic Courtès
Danny Milosavljevic  skribis:

> Hi Ludo,
>
> On Tue, 02 May 2017 23:11:05 +0200
> l...@gnu.org (Ludovic Courtès) wrote:
>> OK.  Are these “UUIDs” 160-bit long like the “real” ones?  If they are,
>> I’d suggest ignoring the problem for now.
>
> No, unfortunately not.  There's also a similar problem in the FAT support in 
> the same module.
>
> I think Linux doesn't actually mean real DCE uuids when they say "uuid", so I 
> don't think pretending that they are real uuids is going to be useful 
> (because at some point control passes to /dev/disk/by-uuid, parted or grub - 
> which interpret uuids like they want - which isn't necessarily as real uuids).
>
> So I think the best course of action is to drop the real DCE uuids entirely 
> and make uuids be free-form strings - like these other programs already 
> decided...
>
> What do you think?

I’d prefer to add a special ‘iso-9660-uuid’ form similar to ‘uuid’ in
(gnu system file-systems).

That way we could detect that we get a valid UUID at macro-expansion
time or system-instantiation time, rather than end up with an error at
boot time.

WDYT?

Ludo’.



Re: Problems running 'check-system'

2017-05-08 Thread Ludovic Courtès
Hi Chris,

Chris Marusich  skribis:

> I think I might have finally found the reason.  When I remove the
> "--pure" from the invocation, the "installed-os" test runs successfully
> on my GuixSD machine.  It seems that, for some reason, "--pure" was the
> cause of the failure.  That's surprising to me, since my expectation was
> that Guix's tests should work just fine in a pure environment.  Could
> this be a bug?

When using ‘--pure’, there’s no ‘git’ command in $PATH.  So my guess
would be that this changes the content of (current-guix), which uses
‘git-predicate’.

In particular, your ‘current-guix’ package ends up including
guile-2.0.9.tar.xz file, because it cannot determine that it’s not under
version control, and then the build process of the ‘guix’ package fails
because this file already exists and is read-only.

QED!  :-)

That’s a limitation of ‘git-predicate’ in its current form.  Eventually
we’ll require ‘guile-git’ and we won’t have that problem.

In the meantime, the workaround is to add Git to your environment:

  guix environment guix --ad-hoc git --pure

Thanks for debugging it, and I HTH!

Ludo’.



Re: ;;; ERROR: missing interface for module (charting)

2017-05-08 Thread Ludovic Courtès
Hi!

myglc2  skribis:

>   GUILEC   guix/scripts/size.go
> ;;; Failed to autoload make-page-map in (charting):
> ;;; ERROR: missing interface for module (charting)

These messages are about Guile-Charting, an optional dependency of this
tool:

  https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-size.html

You’re expecting to have this message when Guile-Charting is missing,
but that’s fine: it just means that you won’t be able to use ‘guix size
--map-file’.

That said, I agree that these messages are needlessly alarming.  Not
sure how to fix them.

Ludo’.



Re: "Perfect Setup" for hacking on Nix?

2017-05-08 Thread Ludovic Courtès
Hi,

Chris Marusich  skribis:

> I asked on nix-dev, and the (limited) response was basically that you
> should use whatever works best for you:
>
> https://mailman.science.uu.nl/pipermail/nix-dev/2017-April/023416.html
>
> I guess that means I should look into a C++ IDE (Eclipse?) or the emacs
> ecosystem for C/C++.

Yeah.  As Thomas wrote, Semantic (part of Emacs) or KDEvelop are your
best bets.

But fundamentally, C++ doesn’t lend itself to live coding the way Lisp
does, so you’ll probably never have an environment close to the
Emacs/Geiser combo.

Ludo’.



Re: [PATCH] Add neofetch to games.scm doubleplusgoo...@gmail.com

2017-05-08 Thread Arun Isaac

Thank you for your contribution!

> Pretty small patch for my first time commiting. From 
> ff50a931905376440f245c37df620d724a78dde9 Mon Sep 17 00:00:00 2001
> From: "Ethan R. Jones" 
> Date: Fri, 5 May 2017 22:02:48 -0400
> Subject: [PATCH] Adding neofetch to the games package expression.

Please look at earlier commit messages in the git log. Your commit
message should be something like:

gnu: Add neofetch.

* gnu/packages/games.scm (neofetch): New variable.

> ---
>  gnu/packages/games.scm | 35 +++
>  1 file changed, 35 insertions(+)

I don't think we should put this package in games.scm. But, I am unable
to think of a good alternative. Ideas?

> +(define-public neofetch
> +  (package
> +(name "neofetch")
> +(version "3.1.0")
> +(source (origin
> +  (method git-fetch)
> +  (uri
> +   (git-reference
> +(url "https://github.com/dylanaraps/neofetch.git";)
> +(commit version)))

Please use the latest release tarball instead of the git checkout.

> +(arguments
> + '(#:tests? #f ;; Because neofetch is a bash script it only needs make 
> install.

This comment can just say "No tests"

> +   #:strip-binaries? #f

Do we need this? If the build does not fail without this, and there are
no other issues, you can remove this argument.

Also, you should send patches to guix-patc...@gnu.org. We were using
guix-devel@gnu.org before, but now all patches go to
guix-patches, and guix-devel is used only for discussion. Could you make
the above changes and send the new patch to guix-patc...@gnu.org?



Equivalent to lib32readline6-dev

2017-05-08 Thread Hartmut Goebel
Hi,

for building LinageOS, the Debina/Ubuntu package lib32readline6-dev is
required – which is the 32-bit version. How can I get this in guix?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: Multiple substitute servers question

2017-05-08 Thread Maxim Cournoyer
Hello,

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

> Hi!
>
> Maxim Cournoyer  skribis:
>
>> I had this problem again now.
>>
>> guix package -i emacs-dvc
>> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
>> ;;;   newer than compiled 
>> /home/maxim/.config/guix/latest/gnu/packages/emacs.go
>> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
>> ;;;   newer than compiled 
>> /gnu/store/nqy9m6hhnkkfwr5wyq5bac96v9s9hc9i-guix-0.12.0-9.25a4/lib/guile/2.0/site-ccache/gnu/packages/emacs.go
>> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
>> ;;;   newer than compiled 
>> /run/current-system/profile/lib/guile/2.0/site-ccache/gnu/packages/emacs.go
>> ;;; note: source file /home/maxim/.config/guix/latest/gnu/packages/emacs.scm
>> ;;;   newer than compiled 
>> /home/maxim/.cache/guile/ccache/2.0-LE-8-2.0/home/maxim/src/guix/gnu/packages/emacs.scm.go
>> The following package will be installed:
>>emacs-dvctrunk-1.591 
>> /gnu/store/sraxmg5qz9i4338s4ks7asgy4v68dgqs-emacs-dvc-trunk-1.591
>>
>> 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%
>> Downloading 
>> https://bayfront.guixsd.org/nar/gzip/6h7ym07plwxfn4zq53ld8zfpbx3a09al-at-spi2-core-2.22.0
>>  (1.1MiB installed)...
>> guix substitute: error: connect: No route to host
>> killing process 13896
>> killing process 13896: No such process
>
> Oh I see.  ‘guix substitute --query’ (aka. “updating list of
> substitutes”) correctly ignores the faulty machine, but ‘guix substitute
> --substitute’ does not.  Could you email this issue to bug-guix?
>
>> Q1: Why did it not fallback automatically to mirror.hydra.gnu.org, which
>> pings, and instead aborted (no, hung) attempting to kill an
>> (inexistant?) process? :)
>
> I think the message is referring the ‘guix substitute’ process, but that
> process exited after printing “error: connect”, and thus guix-daemon had
> no process left to kill.
>

I've opened an issue here:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26833

Thanks!

Maxim


signature.asc
Description: PGP signature


Re: Equivalent to lib32readline6-dev

2017-05-08 Thread Kei Kebreau
Hartmut Goebel  writes:

> Hi,
>
> for building LinageOS, the Debina/Ubuntu package lib32readline6-dev is
> required – which is the 32-bit version. How can I get this in guix?

My first guess would be using

`guix build --system=i686-linux readline@6.2'

to get a look at what you're working with.


signature.asc
Description: PGP signature


Re: [PATCH] Add neofetch to games.scm doubleplusgoo...@gmail.com

2017-05-08 Thread Alex Kost
doubleplusgoo...@gmail.com (2017-05-05 22:13 -0400) wrote:

> Pretty small patch for my first time commiting.

Hello and welcome!  I also have a couple of notes additionally to what
Arun wrote.

> From ff50a931905376440f245c37df620d724a78dde9 Mon Sep 17 00:00:00 2001
> From: "Ethan R. Jones" 
> Date: Fri, 5 May 2017 22:02:48 -0400
> Subject: [PATCH] Adding neofetch to the games package expression.
>
> ---
>  gnu/packages/games.scm | 35 +++
>  1 file changed, 35 insertions(+)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index b31bb93db..b0831b4a0 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -28,6 +28,7 @@
>  ;;; Copyright © 2017 Arun Isaac 
>  ;;; Copyright © 2017 Tobias Geerinckx-Rice 
>  ;;; Copyright © 2017 nee 
> +;;; Copyright © 2017 Ethan "dpg" Jones 
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -3941,3 +3942,37 @@ fabulous Orb of Zot.")
> license:expat
> license:zlib
> license:asl2.0
> +
> +(define-public neofetch
> +  (package
> +(name "neofetch")
> +(version "3.1.0")
> +(source (origin
> +  (method git-fetch)
> +  (uri
> +   (git-reference
> +(url "https://github.com/dylanaraps/neofetch.git";)
> +(commit version)))

We usually use 'url-fetch' with a tarball snapshot (not sure if there is a
preference though):

  https://github.com/dylanaraps/neofetch/archive/3.1.0.tar.gz

> +  (file-name (string-append name "-" version))
> +  (sha256
> +   (base32
> +"0z2ch1j9m5xsdaqn89dd7xlick67jfqpa90mb4djyycgak9751ca"
> +(build-system gnu-build-system)
> +(arguments
> + '(#:tests? #f ;; Because neofetch is a bash script it only needs make 
> install.
> +   #:strip-binaries? #f
> +   #:phases
> +   (modify-phases %standard-phases
> + (delete 'configure)
> + (delete 'build))
> +   #:make-flags  ;; We need to the Makefile to output to our proper 
> store.
> +   (list (string-append "DESTDIR=" %output
> +(inputs `(("bash" ,bash)))  ;; Only requires bash!
> +(synopsis "System info script")
> +(description "Neofetch is a CLI system information tool written in
> +BASH.  Neofetch displays information about your system next to an image, 
> your OS
> +logo, or any ASCII file of your choice.  The main purpose of Neofetch is
> +to be used in screenshots to show other users what OS/Distro you're
> +running, what Theme/Icons you're using etc.  ")
  ^^
Please remove those spaces.

> +(home-page "https://github.com/dylanaraps/neofetch";)
> +(license license:expat)))

-- 
Alex



Re: [PATCH] Add neofetch to games.scm doubleplusgoo...@gmail.com

2017-05-08 Thread Leo Famulari
On Mon, May 08, 2017 at 08:27:07PM +0300, Alex Kost wrote:
> > +(version "3.1.0")
> > +(source (origin
> > +  (method git-fetch)
> > +  (uri
> > +   (git-reference
> > +(url "https://github.com/dylanaraps/neofetch.git";)
> > +(commit version)))
> 
> We usually use 'url-fetch' with a tarball snapshot (not sure if there is a
> preference though):
> 
>   https://github.com/dylanaraps/neofetch/archive/3.1.0.tar.gz

Unless we need a specific Git commit, I think url-fetch is better
because it has fewer dependencies. Git is a huge package.


signature.asc
Description: PGP signature


Re: ;;; ERROR: missing interface for module (charting)

2017-05-08 Thread myglc2

On 05/08/2017 at 14:25 Ludovic Courtès writes:

> Hi!
>
> myglc2  skribis:
>
>>   GUILEC   guix/scripts/size.go
>> ;;; Failed to autoload make-page-map in (charting):
>> ;;; ERROR: missing interface for module (charting)
>
> These messages are about Guile-Charting, an optional dependency of this
> tool:
>
>   https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-size.html
>
> You’re expecting to have this message when Guile-Charting is missing,
> but that’s fine: it just means that you won’t be able to use ‘guix size
> --map-file’.
>
> That said, I agree that these messages are needlessly alarming.  Not
> sure how to fix them.
>
> Ludo’.

Thanks, that's what I thought but I am confused because I already have
guile-charting installed ...

g1@g1 ~/src/guix$ guix package -I | grep charting
guile-charting  0.2.0   out 
/gnu/store/pykm7a8a9p2qs5nwxsb48vvl8iz1kjd4-guile-charting-0.2.0

I have tried adding it to the environment, but I still get these
messages ...

g1@g1 ~/src/guix$ guix environment --ad-hoc guile-charting -e "(@ (gnu packages 
package-management) guix)" -M 4 -c 4
g1@g1 ~/src/guix [env]$ rm guix/scripts/size.go
g1@g1 ~/src/guix [env]$ make
make  all-recursive
make[1]: Entering directory '/home/g1/src/guix'
Making all in po/guix
make[2]: Entering directory '/home/g1/src/guix/po/guix'
make[2]: Leaving directory '/home/g1/src/guix/po/guix'
Making all in po/packages
make[2]: Entering directory '/home/g1/src/guix/po/packages'
make[2]: Leaving directory '/home/g1/src/guix/po/packages'
make[2]: Entering directory '/home/g1/src/guix'
Compiling Scheme modules...
  LOAD (guix scripts size)
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
  GUILEC   guix/scripts/size.go
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
guix/scripts/size.scm:211:2: warning: possibly unbound variable `make-page-map'
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
;;; Failed to autoload make-page-map in (charting):
;;; ERROR: missing interface for module (charting)
make[2]: Leaving directory '/home/g1/src/guix'
make[1]: Leaving directory '/home/g1/src/guix'
g1@g1 ~/src/guix [env]$


g1@g1 ~/src/guix [env]$ guix --version
guix (GNU Guix) 0.12.0.3556-484f

g1@g1 ~/src/guix [env]$ git -C ~/.config/guix/latest describe
v0.12.0-3556-g484f7a886

TIA - George