1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
6 ;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
8 ;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
9 ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages bootloaders)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages admin)
30 #:use-module ((gnu packages algebra) #:select (bc))
31 #:use-module (gnu packages assembly)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages disk)
34 #:use-module (gnu packages bison)
35 #:use-module (gnu packages cdrom)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages cross-base)
38 #:use-module (gnu packages disk)
39 #:use-module (gnu packages firmware)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages fontutils)
42 #:use-module (gnu packages gcc)
43 #:use-module (gnu packages gettext)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages man)
46 #:use-module (gnu packages mtools)
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages texinfo)
52 #:use-module (gnu packages tls)
53 #:use-module (gnu packages sdl)
54 #:use-module (gnu packages swig)
55 #:use-module (gnu packages virtualization)
56 #:use-module (gnu packages web)
57 #:use-module (guix build-system gnu)
58 #:use-module (guix download)
59 #:use-module (guix git-download)
60 #:use-module ((guix licenses) #:prefix license:)
61 #:use-module (guix packages)
62 #:use-module (guix utils)
63 #:use-module (srfi srfi-1)
64 #:use-module (srfi srfi-26))
67 ;; GNU Unifont, <http://gnu.org/s/unifont>.
68 ;; GRUB needs it for its graphical terminal, gfxterm.
72 "http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.bdf.gz")
75 "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
83 (uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz"))
86 "03vvdfhdmf16121v7xs8is2krwnv15wpkhkf16a4yf8nsfc3f2w1"))))
87 (build-system gnu-build-system)
89 `(#:phases (modify-phases %standard-phases
90 (add-after 'unpack 'patch-stuff
91 (lambda* (#:key inputs #:allow-other-keys)
92 (substitute* "grub-core/Makefile.in"
93 (("/bin/sh") (which "sh")))
95 ;; Give the absolute file name of 'mdadm', used to
96 ;; determine the root file system when it's a RAID
97 ;; device. Failing to do that, 'grub-probe' silently
98 ;; fails if 'mdadm' is not in $PATH.
99 (substitute* "grub-core/osdep/linux/getroot.c"
100 (("argv\\[0\\] = \"mdadm\"")
101 (string-append "argv[0] = \""
102 (assoc-ref inputs "mdadm")
105 ;; Make the font visible.
106 (copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz")
107 (system* "gunzip" "unifont.bdf.gz")
109 (add-before 'check 'disable-flaky-test
111 ;; This test is unreliable. For more information, see:
112 ;; <https://bugs.gnu.org/26936>.
113 (substitute* "Makefile.in"
114 (("grub_cmd_date grub_cmd_set_date grub_cmd_sleep")
115 "grub_cmd_date grub_cmd_sleep"))
117 ;; Disable tests on ARM and AARCH64 platforms.
118 #:tests? ,(not (any (cute string-prefix? <> (or (%current-target-system)
120 '("arm" "aarch64")))))
122 `(("gettext" ,gettext-minimal)
124 ;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and
125 ;; 'grub-install' to recognize mapped devices (LUKS, etc.)
128 ;; Depend on mdadm, which is invoked by 'grub-probe' and 'grub-install'
129 ;; to determine whether the root file system is RAID.
132 ("freetype" ,freetype)
133 ;; ("libusb" ,libusb)
135 ("ncurses" ,ncurses)))
137 `(("pkg-config" ,pkg-config)
140 ;; Due to a bug in flex >= 2.6.2, GRUB must be built with an older flex:
141 ;; <http://lists.gnu.org/archive/html/grub-devel/2017-02/msg00133.html>
142 ;; TODO Try building with flex > 2.6.4.
145 ("help2man" ,help2man)
147 ;; Dependencies for the test suite. The "real" QEMU is needed here,
148 ;; because several targets are used.
150 ("qemu" ,qemu-minimal-2.10)
151 ("xorriso" ,xorriso)))
152 (home-page "https://www.gnu.org/software/grub/")
153 (synopsis "GRand Unified Boot loader")
155 "GRUB is a multiboot bootloader. It is used for initially loading the
156 kernel of an operating system and then transferring control to it. The kernel
157 then goes on to load the rest of the operating system. As a multiboot
158 bootloader, GRUB handles the presence of multiple operating systems installed
159 on the same computer; upon booting the computer, the user is presented with a
160 menu to select one of the installed operating systems.")
161 (license license:gpl3+)
162 (properties '((cpe-name . "grub2")))))
164 (define-public grub-efi
168 (synopsis "GRand Unified Boot loader (UEFI version)")
170 `(("efibootmgr" ,efibootmgr)
172 ,@(package-inputs grub)))
174 `(;; TODO: Tests need a UEFI firmware for qemu. There is one at
175 ;; https://github.com/tianocore/edk2/tree/master/OvmfPkg .
176 ;; Search for 'OVMF' in "tests/util/grub-shell.in".
177 ,@(substitute-keyword-arguments (package-arguments grub)
179 ((#:configure-flags flags ''())
180 `(cons "--with-platform=efi" ,flags))
182 `(modify-phases ,phases
183 (add-after 'patch-stuff 'use-absolute-efibootmgr-path
184 (lambda* (#:key inputs #:allow-other-keys)
185 (substitute* "grub-core/osdep/unix/platform.c"
187 (string-append (assoc-ref inputs "efibootmgr")
188 "/sbin/efibootmgr")))
190 (add-after 'patch-stuff 'use-absolute-mtools-path
191 (lambda* (#:key inputs #:allow-other-keys)
192 (let ((mtools (assoc-ref inputs "mtools")))
193 (substitute* "util/grub-mkrescue.c"
195 (string-append "\"" mtools
197 (substitute* "util/grub-mkrescue.c"
199 (string-append "\"" mtools
203 ;; Because grub searches hardcoded paths it's easiest to just build grub
204 ;; again to make it find both grub-pc and grub-efi. There is a command
205 ;; line argument which allows you to specify ONE platform - but
206 ;; grub-mkrescue will use multiple platforms if they are available
207 ;; in the installation directory (without command line argument).
208 (define-public grub-hybrid
212 (synopsis "GRand Unified Boot loader (hybrid version)")
215 ,@(package-inputs grub-efi)))
217 (substitute-keyword-arguments (package-arguments grub-efi)
218 ((#:modules modules `((guix build utils) (guix build gnu-build-system)))
219 `((ice-9 ftw) ,@modules))
221 `(modify-phases ,phases
222 (add-after 'install 'install-non-efi
223 (lambda* (#:key inputs outputs #:allow-other-keys)
224 (let ((input-dir (string-append (assoc-ref inputs "grub")
226 (output-dir (string-append (assoc-ref outputs "out")
230 (if (not (or (string-prefix? "." basename)
231 (file-exists? (string-append output-dir "/" basename))))
232 (symlink (string-append input-dir "/" basename)
233 (string-append output-dir "/" basename))))
237 (define-public syslinux
238 (let ((commit "bb41e935cc83c6242de24d2271e067d76af3585c"))
241 (version (git-version "6.04-pre" "1" commit))
245 (url "https://github.com/geneC/syslinux")
247 (file-name (git-file-name name version))
250 "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc"))))
251 (build-system gnu-build-system)
255 ("python-2" ,python-2)))
257 `(("libuuid" ,util-linux)
260 `(#:parallel-build? #f
262 (list (string-append "BINDIR=" %output "/bin")
263 (string-append "SBINDIR=" %output "/sbin")
264 (string-append "LIBDIR=" %output "/lib")
265 (string-append "INCDIR=" %output "/include")
266 (string-append "DATADIR=" %output "/share")
267 (string-append "MANDIR=" %output "/share/man")
271 (modify-phases %standard-phases
272 (add-after 'unpack 'patch-files
273 (lambda* (#:key inputs #:allow-other-keys)
274 (substitute* (find-files "." "Makefile.*|ppmtolss16")
275 (("/bin/pwd") (which "pwd"))
276 (("/bin/echo") (which "echo"))
277 (("/usr/bin/perl") (which "perl")))
278 (let ((mtools (assoc-ref inputs "mtools")))
279 (substitute* (find-files "." "\\.c$")
281 (string-append mtools "/bin/mcopy"))
283 (string-append mtools "/bin/mattrib"))))
286 (add-before 'build 'set-permissions
288 (zero? (system* "chmod" "a+w" "utils/isohybrid.in"))))
292 (substitute* "tests/unittest/include/unittest/unittest.h"
293 ;; Don't look up headers under /usr.
294 (("/usr/include/") ""))
295 (zero? (system* "make" "unittest")))))))
296 (home-page "http://www.syslinux.org")
297 (synopsis "Lightweight Linux bootloader")
298 (description "Syslinux is a lightweight Linux bootloader.")
299 (license (list license:gpl2+
300 license:bsd-3 ; gnu-efi/*
301 license:bsd-4 ; gnu-efi/inc/* gnu-efi/lib/*
303 license:expat license:isc license:zlib)))))
312 "mirror://kernel.org/software/utils/dtc/"
313 "dtc-" version ".tar.xz"))
316 "0zkvih0fpwvk31aqyyfy9kn13nbi76c21ihax15p6h1wrjzh48rq"))))
317 (build-system gnu-build-system)
323 `(("python-2" ,python-2)))
327 (string-append "PREFIX=" (assoc-ref %outputs "out"))
328 (string-append "SETUP_PREFIX=" (assoc-ref %outputs "out"))
331 (modify-phases %standard-phases
332 (delete 'configure)))) ; no configure script
333 (home-page "https://www.devicetree.org")
334 (synopsis "Compiles device tree source files")
335 (description "@command{dtc} compiles
336 @uref{http://elinux.org/Device_Tree_Usage, device tree source files} to device
337 tree binary files. These are board description files used by Linux and BSD.")
338 (license license:gpl2+)))
347 "ftp://ftp.denx.de/pub/u-boot/"
348 "u-boot-" version ".tar.bz2"))
351 "0j60p4iskzb4hamxgykc6gd7xchxfka1zwh8hv08r9rrc4m3r8ad"))))
356 ("python-2" ,python-2)
357 ("python2-coverage" ,python2-coverage)
358 ("python2-pytest" ,python2-pytest)
361 (build-system gnu-build-system)
362 (home-page "http://www.denx.de/wiki/U-Boot/")
363 (synopsis "ARM bootloader")
364 (description "U-Boot is a bootloader used mostly for ARM boards. It
365 also initializes the boards (RAM etc).")
366 (license license:gpl2+)))
368 (define-public u-boot-tools
371 (name "u-boot-tools")
373 `(#:make-flags '("HOSTCC=gcc")
374 #:test-target "tests"
376 (modify-phases %standard-phases
377 (add-after 'unpack 'patch
378 (lambda* (#:key inputs #:allow-other-keys)
379 (substitute* "Makefile"
380 (("/bin/pwd") (which "pwd"))
381 (("/bin/false") (which "false")))
382 (substitute* "tools/dtoc/fdt_util.py"
384 (substitute* "test/run"
385 ;; Make it easier to find test failures.
386 (("#!/bin/bash") "#!/bin/bash -x")
387 ;; pytest doesn't find it otherwise.
388 (("test/py/tests/test_ofplatdata.py")
389 "tests/test_ofplatdata.py")
390 ;; This test would require git.
391 (("\\./tools/patman/patman") (which "true"))
392 ;; This test would require internet access.
393 (("\\./tools/buildman/buildman") (which "true")))
394 (substitute* "test/py/tests/test_sandbox_exit.py"
396 "@pytest.mark.skip(reason='Guix has problems with SIGINT')
398 (substitute* "tools/binman/binman.py"
399 (("100%") "99%")) ; TODO: Find out why that is needed.
402 (lambda* (#:key make-flags #:allow-other-keys)
403 (call-with-output-file "configs/tools_defconfig"
405 (display "CONFIG_SYS_TEXT_BASE=0\n" port)))
406 (apply invoke "make" "tools_defconfig" make-flags)))
408 (lambda* (#:key inputs make-flags #:allow-other-keys)
409 (apply invoke "make" "tools-only" make-flags)
410 (apply invoke "make" "envtools" make-flags)))
412 (lambda* (#:key outputs #:allow-other-keys)
413 (let* ((out (assoc-ref outputs "out"))
414 (bin (string-append out "/bin")))
415 (for-each (lambda (name)
416 (install-file name bin))
420 "tools/gen_ethaddr_crc"
427 "tools/env/fw_printenv"))
430 (add-after 'install 'check
431 (lambda* (#:key make-flags test-target #:allow-other-keys)
432 (apply invoke "make" "mrproper" make-flags)
433 (setenv "SDL_VIDEODRIVER" "dummy")
434 (setenv "PAGER" "cat")
435 (apply invoke "make" test-target make-flags)
436 (symlink "build-sandbox_spl" "sandbox")
437 (invoke "test/image/test-imagetools.sh"))))))
438 (description "U-Boot is a bootloader used mostly for ARM boards. It
439 also initializes the boards (RAM etc). This package provides its
440 board-independent tools.")))
442 (define (make-u-boot-package board triplet)
443 "Returns a u-boot package for BOARD cross-compiled for TRIPLET."
444 (let ((same-arch? (if (string-prefix? (%current-system)
445 (gnu-triplet->nix-system triplet))
450 (name (string-append "u-boot-"
451 (string-replace-substring (string-downcase board)
454 `(,@(if (not same-arch?)
455 `(("cross-gcc" ,(cross-gcc triplet #:xgcc gcc-7))
456 ("cross-binutils" ,(cross-binutils triplet)))
458 ,@(package-native-inputs u-boot)))
460 `(#:modules ((ice-9 ftw) (guix build utils) (guix build gnu-build-system))
464 ,@(if (not same-arch?)
465 `((string-append "CROSS_COMPILE=" ,triplet "-"))
468 (modify-phases %standard-phases
470 (lambda* (#:key outputs make-flags #:allow-other-keys)
471 (let ((config-name (string-append ,board "_defconfig")))
472 (if (file-exists? (string-append "configs/" config-name))
473 (zero? (apply system* "make" `(,@make-flags ,config-name)))
475 (display "Invalid board name. Valid board names are:"
476 (current-error-port))
477 (let ((suffix-len (string-length "_defconfig"))
478 (entries (scandir "configs")))
479 (for-each (lambda (file-name)
480 (when (string-suffix? "_defconfig" file-name)
481 (format (current-error-port)
483 (string-drop-right file-name
485 (sort entries string-ci<)))
488 (lambda* (#:key outputs #:allow-other-keys)
489 (let* ((out (assoc-ref outputs "out"))
490 (libexec (string-append out "/libexec"))
492 (find-files "." ".*\\.(bin|efi|img|spl|itb|dtb|rksd)$")
493 (find-files "." "^(MLO|SPL)$"))))
495 (install-file ".config" libexec)
496 ;; Useful for "qemu -kernel".
497 (install-file "u-boot" libexec)
500 (let ((target-file (string-append libexec "/" file)))
501 (mkdir-p (dirname target-file))
502 (copy-file file target-file)))
503 uboot-files))))))))))
505 (define-public u-boot-vexpress
506 (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf"))
508 (define-public u-boot-malta
509 (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
511 (define-public u-boot-beagle-bone-black
512 (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf"))
514 (define-public u-boot-pine64-plus
515 (let ((base (make-u-boot-package "pine64_plus" "aarch64-linux-gnu")))
519 (substitute-keyword-arguments (package-arguments base)
521 `(modify-phases ,phases
522 (add-after 'unpack 'set-environment
523 (lambda* (#:key inputs #:allow-other-keys)
524 (let ((bl31 (string-append (assoc-ref inputs "firmware")
527 ;; This is necessary when we're using the bundled dtc.
528 ;(setenv "PATH" (string-append (getenv "PATH") ":"
533 `(("firmware" ,arm-trusted-firmware-pine64-plus)
534 ,@(package-native-inputs base))))))
536 (define-public u-boot-banana-pi-m2-ultra
537 (make-u-boot-package "Bananapi_M2_Ultra" "arm-linux-gnueabihf"))
539 (define-public u-boot-a20-olinuxino-lime
540 (make-u-boot-package "A20-OLinuXino-Lime" "arm-linux-gnueabihf"))
542 (define-public u-boot-a20-olinuxino-lime2
543 (make-u-boot-package "A20-OLinuXino-Lime2" "arm-linux-gnueabihf"))
545 (define-public u-boot-a20-olinuxino-micro
546 (make-u-boot-package "A20-OLinuXino_MICRO" "arm-linux-gnueabihf"))
548 (define-public u-boot-nintendo-nes-classic-edition
549 (make-u-boot-package "Nintendo_NES_Classic_Edition" "arm-linux-gnueabihf"))
551 (define-public u-boot-wandboard
552 (make-u-boot-package "wandboard" "arm-linux-gnueabihf"))
554 (define-public u-boot-mx6cuboxi
555 (make-u-boot-package "mx6cuboxi" "arm-linux-gnueabihf"))
557 (define-public u-boot-novena
558 (make-u-boot-package "novena" "arm-linux-gnueabihf"))
560 (define-public u-boot-cubieboard
561 (make-u-boot-package "Cubieboard" "arm-linux-gnueabihf"))
563 (define-public u-boot-puma-rk3399
564 (let ((base (make-u-boot-package "puma-rk3399" "aarch64-linux-gnu")))
568 (substitute-keyword-arguments (package-arguments base)
570 `(modify-phases ,phases
571 (add-after 'unpack 'set-environment
572 (lambda* (#:key inputs #:allow-other-keys)
573 ;; Need to copy the firmware into u-boot build
575 (copy-file (string-append (assoc-ref inputs "firmware")
576 "/bl31.bin") "bl31-rk3399.bin")
577 (copy-file (string-append (assoc-ref inputs "firmware-m0")
578 "/rk3399m0.bin") "rk3399m0.bin")
580 (add-after 'build 'build-itb
581 (lambda* (#:key make-flags #:allow-other-keys)
582 ;; The u-boot.itb is not built by default.
583 (apply invoke "make" `(,@make-flags ,"u-boot.itb"))))
584 (add-after 'build-itb 'build-rksd
585 (lambda* (#:key inputs #:allow-other-keys)
586 ;; Build Rockchip SD card images.
587 (invoke "./tools/mkimage" "-T" "rksd" "-n" "rk3399" "-d"
588 "spl/u-boot-spl.bin" "u-boot-spl.rksd")))))))
590 `(("firmware" ,arm-trusted-firmware-puma-rk3399)
591 ("firmware-m0" ,rk3399-cortex-m0)
592 ,@(package-native-inputs base))))))
594 (define-public vboot-utils
597 (version "R63-10032.B")
599 ;; XXX: Snapshots are available but changes timestamps every download.
602 (url (string-append "https://chromium.googlesource.com"
603 "/chromiumos/platform/vboot_reference"))
604 (commit (string-append "release-" version))))
605 (file-name (string-append name "-" version "-checkout"))
608 "0h0m3l69vp9dr6xrs1p6y7ilkq3jq8jraw2z20kqfv7lvc9l1lxj"))))
609 (build-system gnu-build-system)
611 `(#:make-flags (list "CC=gcc"
612 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
613 #:phases (modify-phases %standard-phases
614 (add-after 'unpack 'patch-hard-coded-paths
615 (lambda* (#:key inputs outputs #:allow-other-keys)
616 (let ((coreutils (assoc-ref inputs "coreutils"))
617 (diffutils (assoc-ref inputs "diffutils")))
618 (substitute* "futility/misc.c"
619 (("/bin/cp") (string-append coreutils "/bin/cp")))
620 (substitute* "tests/bitmaps/TestBmpBlock.py"
621 (("/usr/bin/cmp") (string-append diffutils "/bin/cmp")))
622 (substitute* "vboot_host.pc.in"
624 (string-append "prefix=" (assoc-ref outputs "out"))))
627 (add-before 'check 'patch-tests
629 ;; These tests compare diffs against known-good values.
630 ;; Patch the paths to match those in the build container.
631 (substitute* (find-files "tests/futility/expect_output")
632 (("/mnt/host/source/src/platform/vboot_reference")
633 (string-append "/tmp/guix-build-" ,name "-" ,version
635 ;; Tests require write permissions to many of these files.
636 (for-each make-file-writable (find-files "tests/futility"))
638 #:test-target "runtests"))
640 `(("pkg-config" ,pkg-config)
643 ("diffutils" ,diffutils)
644 ("python@2" ,python-2)))
646 `(("coreutils" ,coreutils)
649 ("openssl:static" ,openssl "static")
650 ("util-linux" ,util-linux)))
652 "https://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot")
653 (synopsis "ChromiumOS verified boot utilities")
655 "vboot-utils is a collection of tools to facilitate booting of
656 Chrome-branded devices. This includes the @command{cgpt} partitioning
657 program, the @command{futility} and @command{crossystem} firmware management
659 (license license:bsd-3)))
661 (define-public os-prober
668 (uri (string-append "mirror://debian/pool/main/o/os-prober/os-prober_"
672 "1vb45i76bqivlghrq7m3n07qfmmq4wxrkplqx8gywj011rhq19fk"))))
673 (build-system gnu-build-system)
675 `(#:modules ((guix build gnu-build-system)
677 (ice-9 regex) ; for string-match
678 (srfi srfi-26)) ; for cut
679 #:make-flags (list "CC=gcc")
680 #:tests? #f ; no tests
682 (modify-phases %standard-phases
684 (lambda* (#:key outputs #:allow-other-keys)
685 (substitute* (find-files ".")
686 (("/usr") (assoc-ref outputs "out")))
687 (substitute* (find-files "." "50mounted-tests$")
688 (("mkdir") "mkdir -p"))
691 (lambda* (#:key outputs #:allow-other-keys)
692 (define (find-files-non-recursive directory)
693 (find-files directory
695 (string-match (string-append "^" directory "/[^/]*$")
699 (let* ((out (assoc-ref outputs "out"))
700 (bin (string-append out "/bin"))
701 (lib (string-append out "/lib"))
702 (share (string-append out "/share")))
703 (for-each (cut install-file <> bin)
704 (list "linux-boot-prober" "os-prober"))
705 (install-file "newns" (string-append lib "/os-prober"))
706 (install-file "common.sh" (string-append share "/os-prober"))
707 (install-file "os-probes/mounted/powerpc/20macosx"
708 (string-append lib "/os-probes/mounted"))
713 (let ((destination (string-append lib "/" directory
714 "/" (basename file))))
715 (mkdir-p (dirname destination))
716 (copy-recursively file destination)))
717 (append (find-files-non-recursive (string-append directory "/common"))
718 (find-files-non-recursive (string-append directory "/x86")))))
719 (list "os-probes" "os-probes/mounted" "os-probes/init"
720 "linux-boot-probes" "linux-boot-probes/mounted"))
722 (home-page "https://joeyh.name/code/os-prober")
723 (synopsis "Detect other operating systems")
724 (description "os-prober probes disks on the system for other operating
725 systems so that they can be added to the bootloader. It also works out how to
726 boot existing GNU/Linux systems and detects what distribution is installed in
727 order to add a suitable bootloader menu entry.")
728 (license license:gpl2+)))