aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/examples/raspberry-pi-64.tmpl
blob: 185d25c4124375eb07f65dabad88146f7d041d05 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
;; -*- mode: scheme; -*-
;; This is an operating-system configuration template of a
;; 64-bit minimal system for a Raspberry Pi with local storage.

;; It neither installs firmware nor device-tree files for the Raspberry Pi.
;; It just assumes them to be existing in boot/efi in the same way that some
;; UEFI firmware with ACPI data is usually assumed to be existing on PCs.

;; It expects the boot-partition to be mounted as boot/efi in the same way
;; as it is usually expeted on PCs with UEFI firmware.

(use-modules (gnu)
             (gnu artwork)
             (gnu system nss))
(use-service-modules admin
                     avahi
                     networking
                     ssh)
(use-package-modules certs
                     linux
                     raspberry-pi
                     ssh)

(define-public raspberry-pi-64
  (operating-system
    (host-name "raspberrypi-guix")
    (timezone "Europe/Berlin")
    (bootloader (bootloader-configuration
                 (bootloader grub-efi-bootloader-chain-raspi-64)
                 (targets (list "/boot/efi"))
                 (theme (grub-theme
                         (resolution '(1920 . 1080))
                         (image (file-append
                                 %artwork-repository
                                 "/grub/GuixSD-fully-black-16-9.svg"))))))
    (kernel (customize-linux #:linux linux-libre-arm64-generic
                             ;; It is possible to use a specific defconfig
                             ;; file, for example the "bcmrpi3_defconfig" with
                             ;; the variable shown below.  Unfortunately the
                             ;; kernel built from the linux-libre sources with
                             ;; this defconfig file does not boot.
                             ;;#:extra-version "gnu-bcmrpi3"
                             ;;#:defconfig %bcmrpi3-defconfig
                             ))
    (initrd-modules '())
    (file-systems (cons* (file-system
                           (mount-point "/")
                           (type "ext4")
                           (device (file-system-label "Guix")))
                         (file-system
                           (mount-point "/boot/efi")
                           (type "vfat")
                           (device (file-system-label "EFI")))
                         %base-file-systems))
    (swap-devices (list (swap-space
                         (target "/run/swapfile"))))
    (users (cons* (user-account
                   (name "pi")
                   (group "users")
                   (supplementary-groups '("wheel" "netdev" "audio" "video"))
                   (home-directory "/home/pi"))
                  %base-user-accounts))
    (packages (cons* nss-certs
                     openssh
                     %base-packages))
    (services (cons* (service avahi-service-type)
                     (service dhcp-client-service-type)
                     (service ntp-service-type)
                     (service openssh-service-type
                              (openssh-configuration
                               (x11-forwarding? #t)))
                     %base-services))
    (name-service-switch %mdns-host-lookup-nss)))

raspberry-pi-64
vs73pvscldj8d0wnwypa8")))) (arguments (substitute-keyword-arguments (package-arguments imagemagick/stable) ((#:configure-flags flags #~'()) #~(delete "--disable-docs" #$flags)) ((#:phases phases #~'%standard-phases) #~(modify-phases #$phases (add-before 'build 'set-doc-directory (lambda _ (substitute* "Makefile" ;; Since the Makefile overrides $docdir, modify it to ;; refer to what we want. (("^DOCUMENTATION_PATH[[:blank:]]*=.*$") (string-append "DOCUMENTATION_PATH = " #$output:doc "/share/doc/" #$(package-name this-package) "-" #$(package-version this-package) "\n"))))))))))) (define-public perl-image-magick (package (name "perl-image-magick") (version "6.89") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/J/JC/JCRISTY/" "PerlMagick-" version "-1.tar.gz")) (sha256 (base32 "0n9afy1z5bhf9phrbahnkwhgcmijn8jggpbzwrivw1zhliliiy68")))) (build-system perl-build-system) (native-inputs (list pkg-config)) (inputs (list imagemagick)) (arguments `(#:tests? #f ;;Failed 2/23 test programs. 2/353 subtests failed. #:phases (modify-phases %standard-phases (add-before 'configure 'image-magick-flags (lambda* (#:key inputs #:allow-other-keys) (let ((im (assoc-ref inputs "imagemagick"))) (substitute* "Makefile.PL" (("my \\$INC_magick = .*") "my $INC_magick = `pkg-config --cflags ImageMagick`;\n") (("my \\$LIBS_magick = .*") "my $LIBS_magick = `pkg-config --libs ImageMagick`;\n")) #t))) (add-before 'check 'skip-mpeg-tests (lambda _ ;; TODO: MPEG tests fail even though our imagemagick supports ;; MPEG. Has been reported elsewhere, ;; http://www.imagemagick.org/discourse-server/viewtopic.php?f=7&t=25036, ;; so skip for now. (delete-file "t/mpeg/read.t") #t))))) (home-page "https://metacpan.org/release/PerlMagick") (synopsis "Perl interface to ImageMagick") (description "This Perl extension allows the reading, manipulation and writing of a large number of image file formats using the ImageMagick library. Use it to create, edit, compose, or convert bitmap images from within a Perl script.") ;; See Magick.pm (license (package-license imagemagick)))) (define-public graphicsmagick (package (name "graphicsmagick") (version "1.3.40") (source (origin (method url-fetch) (uri (list (string-append "mirror://sourceforge/graphicsmagick/graphicsmagick" "/" version "/GraphicsMagick-" version ".tar.xz") (string-append "ftp://ftp.graphicsmagick.org/pub/" "GraphicsMagick/" (version-major+minor version) "/GraphicsMagick-" version ".tar.xz"))) (sha256 (base32 "0ikpza74p00hrs4z2cgykf7vhlqnzzkhaidjlcjppiw99sfimp4p")))) (build-system gnu-build-system) (arguments (list #:configure-flags #~(list "--with-frozenpaths" "--enable-shared=yes" "--with-x=yes" "--with-quantum-depth=16" ;required by Octave "--enable-quantum-library-names" (string-append "--with-gs-font-dir=" (search-input-directory %build-inputs "share/fonts/type1/ghostscript"))))) (inputs (list bzip2 font-ghostscript freetype ghostscript graphviz lcms libjpeg-turbo libpng libtiff libwebp libxml2 libx11 xz zlib)) (native-inputs (list pkg-config)) (outputs '("out" ; 13 MiB "doc")) ; ~7 MiB (home-page "http://www.graphicsmagick.org") (synopsis "Create, edit, compose, or convert bitmap images") (description "GraphicsMagick provides a comprehensive collection of utilities, programming interfaces, and GUIs, to support file format conversion, image processing, and 2D vector rendering.") (license license:expat)))