linux-nonfree.scm 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
  4. ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
  5. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  6. ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
  7. ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
  8. ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
  9. ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  25. (define-module (linux-nonfree)
  26. #:use-module ((guix licenses) #:hide (zlib))
  27. #:use-module (gnu packages linux)
  28. #:use-module (guix build-system trivial)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (guix git-download)
  31. #:use-module (guix packages)
  32. #:use-module (guix download))
  33. ;;; Forgive me Stallman for I have sinned.
  34. (define-public radeon-RS780-firmware-non-free
  35. (package
  36. (name "radeon-RS780-firmware-non-free")
  37. (version "f6c767f398fc34a89d05d970ed04e21b781fc33f")
  38. (source (origin
  39. (method git-fetch)
  40. (uri (git-reference
  41. (url "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
  42. (commit version)))
  43. (sha256
  44. (base32
  45. "1lpqigsw93xswcxw9ykxmms2smx86070mg51jqpf7n9w9h6jjs79"))))
  46. (build-system trivial-build-system)
  47. (arguments
  48. `(#:modules ((guix build utils))
  49. #:builder (begin
  50. (use-modules (guix build utils))
  51. (let ((source (assoc-ref %build-inputs "source"))
  52. (fw-dir (string-append %output "/lib/firmware/radeon/")))
  53. (mkdir-p fw-dir)
  54. (for-each (lambda (file)
  55. (copy-file file
  56. (string-append fw-dir "/"
  57. (basename file))))
  58. (find-files source "R600_rlc\\.bin|RS780_.*\\.bin$|LICENSE.radeon"))
  59. #t))))
  60. (home-page "")
  61. (synopsis "Non-free firmware for Radeon integrated chips")
  62. (description "Non-free firmware for Radeon integrated chips")
  63. ;; FIXME: What license?
  64. (license (non-copyleft "http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=blob_plain;f=LICENCE.radeon_firmware;hb=HEAD"))))
  65. (define-public intel-iwlwifi-firmware-non-free
  66. ;; For the network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
  67. (package
  68. (name "intel-iwlwifi-6200-firmware-non-free")
  69. (version "f6c767f398fc34a89d05d970ed04e21b781fc33f")
  70. (source (origin
  71. (method git-fetch)
  72. (uri (git-reference
  73. (url "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
  74. (commit version)))
  75. (sha256
  76. (base32
  77. "1lpqigsw93xswcxw9ykxmms2smx86070mg51jqpf7n9w9h6jjs79"))))
  78. (build-system trivial-build-system)
  79. (arguments
  80. `(#:modules ((guix build utils))
  81. #:builder (begin
  82. (use-modules (guix build utils))
  83. (let ((source (assoc-ref %build-inputs "source"))
  84. (fw-dir (string-append %output "/lib/firmware/")))
  85. (mkdir-p fw-dir)
  86. (for-each (lambda (file)
  87. (copy-file file
  88. (string-append fw-dir "/"
  89. (basename file))))
  90. (find-files source "iwlwifi-.*\\.ucode$|LICENSE.iwlwifi_firmware"))
  91. #t))))
  92. (home-page "")
  93. (synopsis "Non-free firmware for intel wireless chips")
  94. (description "Non-free firmware for intel wireless chips")
  95. (license (non-copyleft "Non-free Intel"))))
  96. (define (linux-nonfree-urls version)
  97. "Return a list of URLs for Linux-Nonfree VERSION."
  98. (list (string-append
  99. "https://www.kernel.org/pub/linux/kernel/v4.x/"
  100. "linux-" version ".tar.xz")))
  101. (define-public linux-nonfree
  102. (let* ((version "4.1.4"))
  103. (package
  104. (inherit linux-libre)
  105. (name "linux-nonfree")
  106. (version version)
  107. (source (origin
  108. (method url-fetch)
  109. (uri (linux-nonfree-urls version))
  110. (sha256
  111. (base32
  112. "17whsim5l9i486y5kchfpm9jhbr9lak4a1gdqygp5kwfrfyz5qiy"))))
  113. ;; (build-system gnu-build-system)
  114. ;; (arguments
  115. ;; `(#:parallel-build? #f))
  116. (synopsis "Mainline Linux kernel, nonfree binary blobs included.")
  117. (description "Linux is a kernel.")
  118. (license gpl2)
  119. (home-page "http://kernel.org/"))))
  120. (define-public perf-nonfree
  121. (package
  122. (inherit perf)
  123. (name "perf-nonfree")
  124. (version (package-version linux-nonfree))
  125. (source (package-source linux-nonfree))
  126. (license (package-license linux-nonfree))))