Subject: [PATCH 1/2] gnu: Add kbd-neo.

From: [email-masked]
Date: Wed, 15 Feb 2017 16:47:59 +0000

From: ng0 <[email-masked]>

* gnu/packages/linux.scm (kbd-neo): New variable.
---
 gnu/packages/linux.scm | 42 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d53f5487b..65221579b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2016 John Darrington <[email-masked]>
 ;;; Copyright © 2016 Marius Bakke <[email-masked]>
 ;;; Copyright © 2016 Rene Saavedra <[email-masked]>
-;;; Copyright © 2016 ng0 <[email-masked]>
+;;; Copyright © 2016, 2017 ng0 <[email-masked]>
 ;;; Copyright © 2017 Leo Famulari <[email-masked]>
 ;;; Copyright © 2017 José Miguel Sánchez García <[email-masked]>
 ;;; Copyright © 2017 Gábor Boskovits <[email-masked]>
@@ -90,6 +90,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (guix download)
+  #:use-module (guix svn-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
@@ -1592,6 +1593,45 @@ system.")
     (license (list license:gpl2                   ;programs
                    license:lgpl2.1))))            ;library
 
+;; The Neo layout is a GPL3 licensed layout already present in Xorg,
+;; but not in kbd. home-page: https://neo-layout.org
+(define kbd-neo
+  (let ((svn-revision 2476)
+        (revision "1"))
+    (package
+      (name "kbd-neo")
+      (version (string-append "0.0.0-" revision "."
+                              (number->string svn-revision)))
+      (source
+       (origin
+         (method svn-fetch)
+         (uri (svn-reference
+               ;; The SVN branch with the neo.map file.
+               (url "https://svn.neo-layout.org/linux/console")
+               (revision svn-revision)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32
+           "169hmlwcwz5sp605i8q5ikckxwsj1n3isylrnynflp30gbv9zrwn"))))
+      (build-system trivial-build-system)
+      (arguments
+       `(#:modules ((guix build utils))
+         #:builder (begin
+                     (use-modules (guix build utils))
+                     (let ((out (string-append %output
+                                               "/share/keymaps/i386/neo"))
+                           (source (assoc-ref %build-inputs "source")))
+                       (mkdir-p out)
+                       (copy-file (string-append source "/neo.map")
+                                  (string-append out "/neo.map"))))))
+      (native-inputs
+       `(("source" ,source)))
+      (home-page "https://neo-layout.org")
+      (license license:gpl3)
+      (synopsis "Neo2 console font")
+      (description
+       "Neo2 console font intended to be installed with kbd."))))
+
 (define-public kbd
   (package
     (name "kbd")
-- 
2.11.1