Skip to content

Instantly share code, notes, and snippets.

@steve-ayerhart
Created September 27, 2018 22:35
Show Gist options
  • Save steve-ayerhart/81c9dfc773472e08002cd890216de481 to your computer and use it in GitHub Desktop.
Save steve-ayerhart/81c9dfc773472e08002cd890216de481 to your computer and use it in GitHub Desktop.
Guixbook Pro
(define-module (bbbsd packages firmware)
#:use-module (guix download)
#:use-module (guix build-system trivial)
#:use-module (guix build-system gnu)
#:use-module (guix build utils)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages python))
(define-public b43-firmware
(package
(name "b43-firmware")
(version "6.30.163.46")
(source (origin
(method url-fetch)
(uri (string-append "http://www.lwfinger.com/"
name
"/broadcom-wl-"
version
".tar.bz2"))
(sha256
(base32 "0baw6gcnrhxbb447msv34xg6rmlcj0gm3ahxwvdwfcvq4xmknz50"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let ((PATH (string-append (assoc-ref %build-inputs "bzip2")
"/bin:"
(assoc-ref %build-inputs "tar")
"/bin:"
(assoc-ref %build-inputs "b43-fwcutter")
"/bin"))
(driver-file (string-append "broadcom-wl-"
,version
".wl_apsta.o"))
(fw-dir (string-append (assoc-ref %outputs "out") "/lib/firmware/")))
(setenv "PATH" PATH)
(system* "tar" "xvf" (assoc-ref %build-inputs "source"))
(mkdir-p fw-dir)
(system* "b43-fwcutter" "-w" fw-dir driver-file)
#t))))
(native-inputs
`(("b43-fwcutter" ,b43-fwcutter)
("source" ,source)
("tar" ,tar)
("bzip2" ,bzip2)))
(home-page "")
(synopsis "")
(description "")
(license #f)))
(define-public b43-fwcutter
(package
(name "b43-fwcutter")
(version "019")
(source (origin
(method url-fetch)
(uri (string-append "http://bues.ch/b43/fwcutter/"
name
"-"
version
".tar.bz2"))
(sha256
(base32 "1ki1f5fy3yrw843r697f8mqqdz0pbsbqnvg4yzkhibpn1lqqbsnn"))))
(build-system gnu-build-system)
(native-inputs
`(("python-2.7" ,python-2.7)))
(arguments
`(#:tests? #f
#:make-flags
(list "CC=gcc")
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'check)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(man (string-append out "/share/man/man1")))
(install-file "b43-fwcutter" bin)
(install-file "b43-fwcutter.1" man)
#t))))))
(home-page "")
(synopsis "")
(description "")
(license #f)))
(use-modules (gnu) (gnu system nss))
(use-modules (gnu packages linux-nonfree))
(use-modules (bbbsd packages firmware))
(use-service-modules desktop)
(use-package-modules bootloaders certs suckless wm gnome)
(operating-system
(host-name "guixbook-pro")
(timezone "America/New_York")
(locale "en_US.utf8")
(kernel linux-nonfree)
(firmware (cons*
linux-firmware-non-free
b43-firmware
%base-firmware))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi")))
(file-systems (cons* (file-system
(device (file-system-label "guixsd"))
(mount-point "/")
(type "ext4"))
(file-system
(device (file-system-label "EFI"))
(mount-point "/boot/efi")
(type "vfat"))
%base-file-systems))
(swap-devices '("/dev/sda3"))
(users (cons (user-account
(name "steve")
(comment "Steve")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video"))
(home-directory "/home/steve"))
%base-user-accounts))
(packages (cons* i3-wm i3status dmenu
gvfs
nss-certs
%base-packages))
(services %desktop-services)
(name-service-switch %mdns-host-lookup-nss))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment