Re: [PATCH 4/7] emacs: Add 'guix-devel-use-current-module'.

2015-07-28 Thread Mathieu Lirzin
Alex Kost  writes:

>>> Mathieu Lirzin (2015-07-25 21:51 +0300) wrote:
>>>
>>> I don't know whether there is such (or any other) suggestion anywhere.
>>> But since that was just an example, not a recommendation (not even a
>>> suggestion), I think it doesn't matter what key binding to use there.
>>> Do you have any preference?  What about "C-H-M-s-u"? :-)
>>
>> I agree it's not really important for advanced Emacs users who will have
>> no problem choosing something adapted to their setup. Nonetheless IMHO
>> consistency and simplicity helps newcomers to understand, So I will be
>> in favour of anything that follows this convention. :)
>>
>> (global-set-key (kbd "C-c ") foo-function-callable-anywhere)
>>
>> (define-key bar-mode-map
>> (kbd "C-c C-")
>> 'foo-function-for-bar-mode)
>
> According to (info "(elisp) Key Binding Conventions"), 'C-c LETTER'
> bindings are reserved for users, so I think using "C-c u" in that
> example is absolutely fine, don't you agree?

I agree.  Sorry for the noise and thanks for retrieving this
reference. ;)

--
Mathieu Lirzin



[PATCH] build: ruby: Rewrite build system to use gem archives.

2015-07-28 Thread David Thompson
Hello Guix hackers,

This patch represents a large change to how we're building Ruby
packages.  Previously, we would download tarballs (mostly auto-generated
ones on GitHub), build the .gem archive, then install it to the output
directory.  This method presented several issues.  No one besides us is
actually using these tarballs to build gems, and often the gems will not
build outside of a git repository due to the proliferation of 'git
ls-files' usage when building the gem.

After some more exploration, those of us interested in Ruby packaging
agreed that the pre-made .gem archives hosted on rubygems.org are in
fact source code, and that our build system could be greatly simplified
by using them.  Using these gem archives will also allow for a 'guix
import rubygems' tool to be written, greatly accelerating our packaging
efforts.

One known caveat is that not all gem archives include the test suite, so
sometimes we have to do without tests.  However, the Ruby dependency
graph already has other testing issues like rampant circular
dependencies, so I don't think this issue is a big deal in comparison.
Anyway, I only had to disable a couple of test suites for existing gems,
and I was happy that the issue wasn't too widespread among our
(currently small) sample size.

One other caveat is that downloading gems from rubygems.org currently
*does not* work because the HTTP responses include an invalid
Content-Type header.  I added a temporary hack to do my development
work (not in this patch), and I'm currently waiting on a response from
the rubygems.org admins to see if they will fix the issue.  So, this
patch should not be applied until this is resolved.

See: 
http://help.rubygems.org/discussions/problems/21223-invalid-content-type-header-when-downloading-gem-archive?unresolve=true

Without further ado, the patch:

>From 70c827becb2ef3909e817091676425eacb32d381 Mon Sep 17 00:00:00 2001
From: David Thompson 
Date: Sun, 26 Jul 2015 22:01:54 -0400
Subject: [PATCH] build: ruby: Rewrite build system to use gem archives.

Co-Authored-By: Pjotr Prins 

* guix/build-system/ruby.scm (lower): Remove git dependency.
  (rubygems-uri): New procedure.
* guix/build/ruby-build-system (gitify, build): Delete.
  (unpack): Use 'gem unpack' utility.
  (check): Add docstring.
  (install): Install the source gem archive.
  (%standard-phases): Remove gitify and build phases.
* gnu/packages/ruby.scm (ruby-hoe, ruby-rake-compiler, ruby-i18n,
  ruby-rspec-support, ruby-rspec-core, ruby-diff-lcs-for-rspec,
  ruby-rspec-expectations, ruby-rspec-mocks, ruby-rspec, bundler,
  ruby-useragent, ruby-bacon, ruby-arel, ruby-connection-pool,
  ruby-net-http-persistent, ruby-minitest, ruby-minitest-sprint,
  ruby-minitest-bacon, ruby-daemons, ruby-git, ruby-slop,
  ruby-multipart-post): Convert to new build system.
---
 gnu/packages/ruby.scm| 222 +++
 guix/build-system/ruby.scm   |  40 +++
 guix/build/ruby-build-system.scm |  39 ---
 3 files changed, 104 insertions(+), 197 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index a481365..196094c 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -154,13 +154,11 @@ a focus on simplicity and productivity.")
 (name "ruby-hoe")
 (version "3.13.1")
 (source (origin
-  (method git-fetch)
-  (uri (git-reference
-(url "https://github.com/seattlerb/hoe.git";)
-(commit "0c11836"))) ; no release tags :(
+  (method url-fetch)
+  (uri (rubygems-uri "hoe" version))
   (sha256
(base32
-"0i8dimf8kxcjgqj9x65bbi3l6hc9p9gbfbb1vmrz42764a4jjbz9"))) )
+"1mac13krdrasn9819dd65xj27kklfy0xdbj3p6s2ij4vlcb46h8q"))) )
 (build-system ruby-build-system)
 (synopsis "Ruby project management helper")
 (description
@@ -178,22 +176,13 @@ announcement.")
 (version "0.9.5")
 (source (origin
   (method url-fetch)
-  (uri (string-append
-"https://github.com/rake-compiler/rake-compiler/archive/v";
-version ".tar.gz"))
-  (file-name (string-append name "-" version ".tar.gz"))
+  (uri (rubygems-uri "rake-compiler" version))
   (sha256
(base32
-"07lk1vl0jqcaqwjjhmg0qshqwcxdyr5kscc9xxm13m03835xgpf3"
+"1k8im2vzj849xdgjk6wafspkiwwapqwm738majchb4dnhnsk64cx"
 (build-system ruby-build-system)
 (arguments
- '(#:tests? #f ; needs cucumber
-   #:phases (modify-phases %standard-phases
-  (add-before 'build 'remove-cucumber-rake-task
-(lambda _
-  ;; Remove cucumber test file because the
-  ;; dependencies are not available right now.
-  (delete-file "tasks/cucumber.rake"))
+ '(#:tests? #f)) ; needs cucumber

Problems with grub2

2015-07-28 Thread Fabian Boucsein
Hello Guix hackers,

i am trying to install GuixSD 0.8.3. I am using this configuration
and try to install it on a USB disk:

;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules admin)

(operating-system
  (host-name "amanita")
  (timezone "Europe/Berlin")
  (locale "en_US.UTF-8")

  ;; Assuming /dev/sdX is the target hard disk, and "root" is
  ;; the label of the target root file system.
  (bootloader (grub-configuration (device "/dev/sdb")))
  (file-systems (cons (file-system
(device "/dev/sdb1")
(title 'device)
(mount-point "/")
(type "ext4"))
  %base-file-systems))

  ;; This is where user accounts are specified.  The "root"
  ;; account is implicit, and is initially created with the
  ;; empty password.
  (users (cons (user-account
(name "fabian")
(comment "fabian")
(group "users")

;; Adding the account to the "wheel" group
;; makes it a sudoer.  Adding it to "audio"
;; and "video" allows the user to play sound
;; and access the webcam.
(supplementary-groups '("wheel"
"audio" "video"))
(home-directory "/home/fabian"))
   %base-user-accounts))

  ;; Globally-installed packages.
  (packages (cons tcpdump %base-packages))

  ;; Add services to the baseline: a DHCP client and
  ;; an SSH server.
  (services (cons* (dhcp-client-service)
   (lsh-service #:port-number )
   %base-services)))

First i tried it with (locale "de_DE.UTF-8") but guix told me that de_DE is
not available. This is of course changeable after installation but will it
be added to the guix installation later?

When i try the installation as mentioned above everything is fine until the
installation of grub. Grub tells me that there are multiple labels assigned
to the device. When i look into /dev/disk/by-label i find one label for a
partition. Is there a way to get rid of this disk labels? I tried it with
parted but that brought no help. In the configuration i am telling that i
want to use device names. Why is grub2 using labels anyway??? I am not sure
what is the source of the problem. With Nix i have the same issue when i
try to install grub2. Grub1 is working fine. Will Grub1 be added to guix? I
have not found a Nix configuration which tells nix to use devices instead
of labels.

Looking forward for any help. By the way i really want to have a working
Guix system. After seeing Ludovics Fosdem talk i am so excited about guix.
What a wonderful idea!

Yours sincerely,
Fabian


Re: [PATCH] xscreenshot and imagefile

2015-07-28 Thread Guix-Bot
Hello,

This is Guix-Bot, a bot meant to put Guix reviewers out of a job. I reviewed
your patch, and here is what I can tell you about it:

PATCH: /home/cyril/guix/0001-gnu-Add-xscreenshot.patch:
- The patch can be applied on top of master.
- The compilation succeeded.
- Guix lint failed:
gnu/packages/suckless.scm:220:5: xscreenshot-1.0: sentences in description 
should be followed by two spaces; possible infraction at 42



Re: [PATCH] xscreenshot and imagefile

2015-07-28 Thread Guix-Bot
Hello,

This is Guix-Bot, a bot meant to put Guix reviewers out of a job. I reviewed
your patch, and here is what I can tell you about it:

PATCH: /home/cyril/guix/0002-gnu-Add-imagefile.patch:
- The patch can be applied on top of master.
- The compilation succeeded.
- No issue while running additional checks.

This patch looks good, someone will probably push it!



Re: [PATCH] xscreenshot and imagefile

2015-07-28 Thread Guix-Bot
Hello,

This is Guix-Bot, a bot meant to put Guix reviewers out of a job. I reviewed
your patch, and here is what I can tell you about it:

PATCH: /home/cyril/guix/0001-gnu-Add-xscreenshot.patch:
- The patch can be applied on top of master.
- The compilation succeeded.
- Guix lint failed:
gnu/packages/suckless.scm:220:5: xscreenshot-1.0: sentences in description 
should be followed by two spaces; possible infraction at 42



Re: [PATCH] xscreenshot and imagefile

2015-07-28 Thread Guix-Bot
Hello,

This is Guix-Bot, a bot meant to put Guix reviewers out of a job. I reviewed
your patch, and here is what I can tell you about it:

PATCH: /home/cyril/guix/0002-gnu-Add-imagefile.patch:
- The patch can be applied on top of master.
- The compilation succeeded.
- No issue while running additional checks.

This patch looks good, someone will probably push it!