diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-08-28 22:31:17 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-08-28 22:31:17 +0200 |
commit | 3db3913ebb8edf12aa7d84ffdb05194f66f32d21 (patch) | |
tree | 79ac7209e3d4914aeabf1b63bb1b7924bfb30bc1 /distro/base.scm | |
parent | 73f9a978ef2bf0c0b115115e8837504636b8bbca (diff) | |
download | guix-3db3913ebb8edf12aa7d84ffdb05194f66f32d21.tar.gz |
distro: Add Linux headers.
* distro/base.scm (linux-headers): New variable.
Diffstat (limited to 'distro/base.scm')
-rw-r--r-- | distro/base.scm | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/distro/base.scm b/distro/base.scm index b7e9bd5af9..38ea64d09c 100644 --- a/distro/base.scm +++ b/distro/base.scm @@ -1038,6 +1038,53 @@ call interface, and powerful string processing.") (home-page "http://www.gnu.org/software/guile/") (license "LGPLv3+"))) +(define-public linux-headers + (let* ((version* "3.3.5") + (build-phase + '(lambda* (#:key outputs #:allow-other-keys) + (setenv "ARCH" "x86_64") ; XXX + (and (zero? (system* "make" "defconfig")) + (zero? (system* "make" "mrproper" "headers_check"))))) + (install-phase + `(lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (and (zero? (system* "make" + (string-append "INSTALL_HDR_PATH=" out) + "headers_install")) + (mkdir (string-append out "/include/config")) + (call-with-output-file + (string-append out + "/include/config/kernel.release") + (lambda (p) + (format p "~a-default~%" ,version*)))))))) + (package + (name "linux-headers") + (version version*) + (source (origin ; TODO: use Linux-Libre + (method http-fetch) + (uri (string-append + "http://www.kernel.org/pub/linux/kernel/v3.x/linux-" + version ".tar.xz")) + (sha256 + (base32 + "0i74jn47f6vs5kcvk8abvz3k08z32c9bbqw0sdjkdxwvr4jbczpv")))) + (build-system gnu-build-system) + (native-inputs `(("perl" ,(nixpkgs-derivation* "perl")))) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:phases (alist-replace + 'build ,build-phase + (alist-replace + 'install ,install-phase + (alist-delete 'configure %standard-phases))) + #:tests? #f)) + (description "Linux kernel headers") + (long-description "Headers of the Linux kernel.") + (license "GPLv2") + (home-page "http://kernel.org/")))) + (define (guile-reader guile) "Build Guile-Reader against GUILE, a package of some version of Guile 1.8 or 2.0." |