gnu: hurd: Use default QEMU guest IP: 10.0.2.15.
[jackhill/guix/guix.git] / gnu / packages / hurd.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016, 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
3 ;;; Copyright © 2018, 2020 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
6 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
7 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages hurd)
26 #:use-module ((guix licenses) #:hide (zlib))
27 #:use-module (guix download)
28 #:use-module (guix packages)
29 #:use-module (gnu packages)
30 #:use-module (guix gexp)
31 #:use-module (guix utils)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system trivial)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages flex)
37 #:use-module (gnu packages gawk)
38 #:use-module (gnu packages gnupg)
39 #:use-module (gnu packages bison)
40 #:use-module (gnu packages libdaemon)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages texinfo)
47 #:use-module (gnu packages xorg) ; libpciaccess
48 #:use-module (guix git-download)
49 #:export (hurd-system?
50 hurd-target?
51 hurd-triplet?))
52
53 (define (hurd-triplet? triplet)
54 (and (string-suffix? "-gnu" triplet)
55 (not (string-contains triplet "linux"))))
56
57 (define (hurd-target?)
58 "Return true if the cross-compilation target or the current system is
59 GNU/Hurd."
60 (or (and=> (%current-target-system) hurd-triplet?)
61 (and (not (%current-target-system))
62 (and=> (%current-system) hurd-triplet?))))
63
64 (define (hurd-system?)
65 "Return true if the current system is the Hurd."
66 (and=> (%current-system) hurd-triplet?))
67
68 (define (hurd-source-url version)
69 (string-append "mirror://gnu/hurd/hurd-"
70 version ".tar.gz"))
71
72 (define-public gnumach-headers
73 (let ((commit "097f9cf735ffa1212b828682ad92f0f6c5f1c552")
74 (revision "1"))
75 (package
76 (name "gnumach-headers")
77 (version (git-version "1.8" revision commit))
78 (source
79 (origin
80 (method git-fetch)
81 (uri (git-reference
82 (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
83 (commit commit)))
84 (file-name (git-file-name "gnumach" version))
85 (sha256
86 (base32
87 "0q36z7k02bykrld90zaxbhyzxlmwlqqs4divgir6ix38zsp6icqk"))))
88 (build-system gnu-build-system)
89 (arguments
90 `(#:phases
91 (modify-phases %standard-phases
92 (replace 'install
93 (lambda _
94 (invoke "make" "install-data")))
95 (delete 'build))
96
97 ;; GNU Mach supports only IA32 currently, so cheat so that we can at
98 ;; least install its headers.
99 ,@(if (%current-target-system)
100 '()
101 ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
102 ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
103 '(#:configure-flags '("--build=i586-pc-gnu"
104 "--host=i686-linux-gnu")))
105
106 #:tests? #f))
107 (native-inputs
108 `(("autoconf" ,autoconf)
109 ("automake" ,automake)
110 ("texinfo" ,texinfo-4)))
111 (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
112 (synopsis "GNU Mach kernel headers")
113 (description
114 "Headers of the GNU Mach kernel.")
115 (license gpl2+))))
116
117 (define-public mig
118 (package
119 (name "mig")
120 (version "1.8")
121 (source
122 (origin
123 (method url-fetch)
124 (uri (string-append "mirror://gnu/mig/mig-"
125 version ".tar.gz"))
126 (sha256
127 (base32
128 "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
129 (build-system gnu-build-system)
130 ;; Flex is needed both at build and run time.
131 (inputs `(("gnumach-headers" ,gnumach-headers)
132 ("flex" ,flex)))
133 (native-inputs
134 `(("flex" ,flex)
135 ("bison" ,bison)))
136 (arguments `(#:tests? #f))
137 (home-page "https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
138 (synopsis "Mach 3.0 interface generator for the Hurd")
139 (description
140 "GNU MIG is the GNU distribution of the Mach 3.0 interface generator
141 MIG, as maintained by the GNU Hurd developers for the GNU project.
142 You need this tool to compile the GNU Mach and GNU Hurd distributions,
143 and to compile the GNU C library for the Hurd. Also, you will need it
144 for other software in the GNU system that uses Mach-based inter-process
145 communication.")
146 (license gpl2+)))
147
148 (define-public hurd-headers
149 ;; Resort to a post-0.9 snapshot that provides the 'file_utimens' and
150 ;; 'file_exec_paths' RPCs that glibc 2.28 expects.
151 (let ((revision "1")
152 (commit "91a51672ff4cfe1f1a0712b4c542ded3081c825b"))
153 (package
154 (name "hurd-headers")
155 (version (git-version "0.9" revision commit))
156 (source (origin
157 (method git-fetch)
158 (uri (git-reference
159 (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
160 (commit commit)))
161 (sha256
162 (base32
163 "16k9wkahz9wasviijz53n6i13nmiwa9fs64ikf1jqh8rl60hw7cz"))
164 (file-name (git-file-name name version))))
165 (build-system gnu-build-system)
166 (native-inputs
167 `(("mig" ,mig)
168 ("autoconf" ,autoconf)
169 ("automake" ,automake)))
170 (arguments
171 `(#:phases
172 (modify-phases %standard-phases
173 (replace 'install
174 (lambda _
175 (invoke "make" "install-headers" "no_deps=t")))
176 (delete 'build))
177
178 #:configure-flags '( ;; Pretend we're on GNU/Hurd; 'configure' wants
179 ;; that.
180 ,@(if (%current-target-system)
181 '()
182 '("--host=i586-pc-gnu"))
183
184 ;; Reduce set of dependencies.
185 "--without-parted"
186 "--disable-ncursesw"
187 "--disable-test"
188 "--without-libbz2"
189 "--without-libcrypt"
190 "--without-libz"
191 ;; Skip the clnt_create check because it expects
192 ;; a working glibc causing a circular dependency.
193 "ac_cv_search_clnt_create=no"
194
195 ;; Annihilate the checks for the 'file_exec_paths'
196 ;; & co. libc functions to avoid "link tests are
197 ;; not allowed after AC_NO_EXECUTABLES" error.
198 "ac_cv_func_file_exec_paths=no"
199 "ac_cv_func_exec_exec_paths=no"
200 "ac_cv_func__hurd_exec_paths=no"
201 "ac_cv_func_file_futimens=no")
202
203 #:tests? #f))
204 (home-page "https://www.gnu.org/software/hurd/hurd.html")
205 (synopsis "GNU Hurd headers")
206 (description
207 "This package provides C headers of the GNU Hurd, used to build the GNU C
208 Library and other user programs.")
209 (license gpl2+))))
210
211 (define-public hurd-minimal
212 (package (inherit hurd-headers)
213 (name "hurd-minimal")
214 (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers)))
215 (arguments
216 (substitute-keyword-arguments (package-arguments hurd-headers)
217 ((#:phases _)
218 '(modify-phases %standard-phases
219 (replace 'install
220 (lambda* (#:key outputs #:allow-other-keys)
221 (let ((out (assoc-ref outputs "out")))
222 ;; We need to copy libihash.a to the output directory manually,
223 ;; since there is no target for that in the makefile.
224 (mkdir-p (string-append out "/include"))
225 (copy-file "libihash/ihash.h"
226 (string-append out "/include/ihash.h"))
227 (mkdir-p (string-append out "/lib"))
228 (copy-file "libihash/libihash.a"
229 (string-append out "/lib/libihash.a"))
230 #t)))
231 (replace 'build
232 (lambda _
233 ;; Install <assert-backtrace.h> & co.
234 (invoke "make" "-Clibshouldbeinlibc"
235 "../include/assert-backtrace.h")
236
237 ;; Build libihash.
238 (invoke "make" "-Clibihash" "libihash.a")))))))
239 (home-page "https://www.gnu.org/software/hurd/hurd.html")
240 (synopsis "GNU Hurd libraries")
241 (description
242 "This package provides libihash, needed to build the GNU C
243 Library for GNU/Hurd.")
244 (license gpl2+)))
245
246 (define-public hurd-core-headers
247 (package
248 (name "hurd-core-headers")
249 (version (package-version hurd-headers))
250 (source #f)
251 (build-system trivial-build-system)
252 (arguments
253 '(#:modules ((guix build union))
254 #:builder (begin
255 (use-modules (ice-9 match)
256 (guix build union))
257 (match %build-inputs
258 (((names . directories) ...)
259 (union-build (assoc-ref %outputs "out")
260 directories)
261 #t)))))
262 (inputs `(("gnumach-headers" ,gnumach-headers)
263 ("hurd-headers" ,hurd-headers)
264 ("hurd-minimal" ,hurd-minimal)))
265 (synopsis "Union of the Hurd headers and libraries")
266 (description
267 "This package contains the union of the Mach and Hurd headers and the
268 Hurd-minimal package which are needed for both glibc and GCC.")
269 (home-page (package-home-page hurd-headers))
270 (license (package-license hurd-headers))))
271
272 (define-public gnumach
273 (package
274 (inherit gnumach-headers)
275 (name "gnumach")
276 (arguments
277 (substitute-keyword-arguments (package-arguments gnumach-headers)
278 ((#:configure-flags flags ''())
279 `(cons "--enable-kdb" ,flags)) ;enable kernel debugger
280 ((#:phases phases '%standard-phases)
281 `(modify-phases %standard-phases
282 (add-after 'install 'produce-image
283 (lambda* (#:key outputs #:allow-other-keys)
284 (let* ((out (assoc-ref outputs "out"))
285 (boot (string-append out "/boot")))
286 (invoke "make" "gnumach.gz")
287 (install-file "gnumach.gz" boot)
288 #t)))))))
289 (native-inputs
290 `(("mig" ,mig)
291 ("perl" ,perl)
292 ("autoconf" ,autoconf)
293 ("automake" ,automake)
294 ("texinfo" ,texinfo-4)))
295 (supported-systems (cons "i686-linux" %hurd-systems))
296 (synopsis "Microkernel of the GNU system")
297 (description
298 "GNU Mach is the microkernel upon which a GNU Hurd system is based.")))
299
300 (define unifont
301 ;; GNU Unifont, <http://gnu.org/s/unifont>.
302 ;; Used the the VGA driver of the Hurd's console client.
303 (origin
304 (method url-fetch)
305 (uri
306 "http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.bdf.gz")
307 (sha256
308 (base32
309 "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
310
311 (define (hurd-rc-script)
312 "Return a script to be installed as /libexec/rc in the 'hurd' package. The
313 script takes care of installing the relevant passive translators on the first
314 boot, since this cannot be done from GNU/Linux."
315 (define translators
316 '(("/servers/crash-dump-core" ("/hurd/crash" "--dump-core"))
317 ("/servers/crash-kill" ("/hurd/crash" "--kill"))
318 ("/servers/crash-suspend" ("/hurd/crash" "--suspend"))
319 ("/servers/password" ("/hurd/password"))
320 ("/servers/socket/1" ("/hurd/pflocal"))
321 ("/servers/socket/2" ("/hurd/pfinet" "--interface" "eth0"
322 "--address" "10.0.2.15" ;the default QEMU guest IP
323 "--netmask" "255.255.255.0"
324 "--gateway" "10.0.2.2"
325 "--ipv6" "/servers/socket/16"))))
326
327 (define rc
328 (with-imported-modules '((guix build utils))
329 #~(begin
330 (use-modules (guix build utils)
331 (ice-9 match))
332
333 ;; "@HURD@" is a placeholder.
334 (setenv "PATH" "@HURD@/bin")
335
336 (define (translated? node)
337 ;; Return true if a translator is installed on NODE.
338 (with-output-to-port (%make-void-port "w")
339 (lambda ()
340 (with-error-to-port (%make-void-port "w")
341 (lambda ()
342 (zero? (system* "showtrans" "-s" node)))))))
343
344 (for-each (match-lambda
345 ((node command)
346 (unless (translated? node)
347 (mkdir-p (dirname node))
348 (apply invoke "settrans" "-c" node command))))
349 '#$translators)
350
351 ;; Start the oh-so-fancy console client.
352 (mkdir-p "/var/run") ;for the PID file
353 (invoke "console" "--daemonize" "-c" "/dev/vcs"
354 "-d" "vga" "-d" "pc_kbd" "-d" "generic_speaker"))))
355
356 ;; FIXME: We want the program to use the cross-compiled Guile when
357 ;; cross-compiling. But why do we need to be explicit here?
358 (with-parameters ((%current-target-system "i586-pc-gnu"))
359 (program-file "rc" rc)))
360
361 (define dde-sources
362 ;; This is the current tip of the dde branch
363 (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136"))
364 (origin
365 (method git-fetch)
366 (uri (git-reference
367 (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
368 (commit commit)))
369 (sha256
370 (base32
371 "1vryinbg75xpydfrv9dbgfnds6knlh8l8bk2rxp32y9dc58z0692"))
372 (file-name (git-file-name "dde" commit)))))
373
374 (define-public hurd
375 (package
376 (name "hurd")
377 (version (package-version hurd-headers))
378 (source (origin (inherit (package-source hurd-headers))
379 (patches (search-patches "hurd-cross.patch"))))
380 (arguments
381 `(#:phases
382 (modify-phases %standard-phases
383 (add-after 'unpack 'prepare-dde
384 (lambda* (#:key native-inputs inputs #:allow-other-keys)
385 (substitute* "Makefile"
386 (("libbpf ")
387 "libbpf libmachdev libmachdevdde libddekit"))
388 (for-each make-file-writable (find-files "."))
389 (let ((dde (or (assoc-ref inputs "dde-sources")
390 (assoc-ref native-inputs "dde-sources"))))
391 (for-each (lambda (dir)
392 (copy-recursively
393 (string-append dde "/" dir ) dir))
394 '("libmachdev" "libmachdevdde" "libddekit")))
395 #t))
396 (add-before 'build 'pre-build
397 (lambda _
398 ;; Don't change the ownership of any file at this time.
399 (substitute* '("daemons/Makefile" "utils/Makefile")
400 (("-o root -m 4755") ""))
401 #t))
402 (add-before 'build 'set-file-names
403 (lambda* (#:key inputs outputs #:allow-other-keys)
404 (let* ((out (assoc-ref outputs "out"))
405 (bash (assoc-ref inputs "bash-minimal"))
406 (coreutils (assoc-ref inputs "coreutils"))
407 (sed (assoc-ref inputs "sed"))
408 (grep (assoc-ref inputs "grep"))
409 (util-linux (assoc-ref inputs "util-linux")))
410 (substitute* '("daemons/runttys.c" "daemons/getty.c" "utils/login.c")
411 (("/bin/login")
412 (string-append out "/bin/login"))
413 (("/bin/bash") (string-append bash "/bin/bash")))
414 (substitute* '("startup/startup.c" "init/init.c" "config/ttys")
415 (("/libexec/")
416 (string-append out "/libexec/")))
417 (substitute* '("utils/uptime.sh")
418 (("/bin/w")
419 (string-append out "/bin/w")))
420 (substitute* "daemons/console-run.c"
421 (("/hurd/")
422 (string-append out "/hurd/")))
423
424 (substitute* '("daemons/runsystem.sh"
425 "daemons/runsystem.hurd.sh"
426 "sutils/MAKEDEV.sh")
427 (("^PATH=.*")
428 (string-append "PATH=" out "/bin:" out "/sbin:"
429 coreutils "/bin:"
430 sed "/bin:" grep "/bin:"
431 util-linux "/bin\n"))
432 (("^SHELL=.*")
433 (string-append "SHELL=" bash "/bin/bash\n"))
434 (("/sbin/") (string-append out "/sbin/"))
435 (("/libexec/") (string-append out "/libexec/"))
436 (("/hurd/") (string-append out "/hurd/")))
437
438 (substitute* "daemons/runsystem.sh"
439 (("export PATH")
440 (string-append "export PATH\n"
441 "\
442 fsysopts / --writable
443
444 # MAKEDEV relies on pipes so this needs to be set up.
445 settrans -c /servers/socket/1 /hurd/pflocal
446
447 (cd /dev; MAKEDEV -D /dev std vcs tty{1,2,3,4,5,6})\n")))
448
449 (substitute* "daemons/runsystem.hurd.sh"
450 (("export PATH")
451 "export PATH
452 fsysopts / --writable\n"))
453 #t)))
454 (add-after 'patch-shebangs 'patch-libexec-shebangs
455 (lambda* (#:key inputs outputs #:allow-other-keys)
456 ;; XXX: Since the 'patch-shebangs' phase doesn't traverse
457 ;; /libexec, do it here.
458 (let* ((out (assoc-ref outputs "out"))
459 (bash (assoc-ref inputs "bash-minimal"))
460 (path (list (string-append bash "/bin"))))
461 (for-each (lambda (file)
462 (patch-shebang file path))
463 (find-files (string-append out "/libexec")))
464 #t)))
465 (add-after 'install 'install-goodies
466 (lambda* (#:key inputs outputs #:allow-other-keys)
467 ;; Install additional goodies.
468 ;; TODO: Build & install *.msgids for rpctrace.
469 (let* ((out (assoc-ref outputs "out"))
470 (datadir (string-append out "/share/hurd")))
471 ;; Install the fancy UTF-8 motd.
472 (mkdir-p (string-append out "/etc"))
473 (copy-file "console/motd.UTF8"
474 (string-append out "/etc/motd"))
475
476 ;; Install the BDF font for use by the console client.
477 (copy-file (assoc-ref inputs "unifont")
478 "unifont.gz")
479 (invoke "gunzip" "unifont.gz")
480 (mkdir-p datadir)
481 (copy-file "unifont"
482 (string-append datadir "/vga-system.bdf"))
483 #t)))
484 (add-after 'install 'install-rc-file
485 (lambda* (#:key inputs outputs #:allow-other-keys)
486 (let* ((out (assoc-ref outputs "out"))
487 (file (string-append out "/libexec/rc"))
488 (rc (assoc-ref inputs "hurd-rc")))
489 (delete-file file)
490 (copy-file rc file)
491 (substitute* file
492 (("@HURD@") out))
493 #t))))
494 #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
495 %output "/lib")
496 "--disable-ncursesw"
497 "--without-libbz2"
498 "--without-libz"
499 "--without-parted")))
500 (build-system gnu-build-system)
501 (inputs
502 `(("glibc-hurd-headers" ,glibc/hurd-headers)
503 ("hurd-rc" ,(hurd-rc-script))
504
505 ("libgcrypt" ,libgcrypt) ;for /hurd/random
506 ("libdaemon" ,libdaemon) ;for /bin/console --daemonize
507 ("unifont" ,unifont)
508 ("libpciaccess" ,libpciaccess)
509
510 ;; Tools for the /libexec/* scripts.
511 ("bash-minimal" ,bash-minimal)
512 ("coreutils" ,coreutils)
513 ("sed" ,sed)
514 ("grep" ,grep)
515 ("util-linux" ,util-linux)))
516 (native-inputs
517 `(("autoconf" ,autoconf)
518 ("automake" ,automake)
519 ("libgcrypt" ,libgcrypt) ;for 'libgcrypt-config'
520 ("pkg-config" ,pkg-config)
521 ("mig" ,(if (%current-target-system)
522 ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
523 ;; hence this hack.
524 (package
525 (inherit mig)
526 (arguments `(#:system "i686-linux")))
527 mig))
528 ("perl" ,perl)
529 ("texinfo" ,texinfo-4)
530 ("dde-sources" ,dde-sources)))
531 (supported-systems %hurd-systems)
532 (home-page "https://www.gnu.org/software/hurd/hurd.html")
533 (synopsis "The kernel servers for the GNU operating system")
534 (description
535 "The Hurd is the kernel for the GNU system, a replacement and
536 augmentation of standard Unix kernels. It is a collection of protocols for
537 system interaction (file systems, networks, authentication), and servers
538 implementing them.")
539 (license gpl2+)))
540
541 (define-public netdde
542 (let ((commit "4a1016f130b6f2065d3f088325e5fb0b2997ae12")
543 (revision "1"))
544 (package
545 (name "netdde")
546 ;; The version prefix corresponds to the version of Linux from which the
547 ;; drivers were taken.
548 (version (git-version "2.6.32.65" revision commit))
549 (source (origin
550 (method git-fetch)
551 (uri (git-reference
552 (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
553 (commit commit)))
554 (sha256
555 (base32
556 "1njv9dszq4lj05yq4v9j5v247hfghpzvvz4hzy0khjjr35mw7hr8"))
557 (file-name (git-file-name name commit))))
558 (build-system gnu-build-system)
559 (arguments
560 `(#:make-flags
561 (list (string-append "SHELL=" (assoc-ref %build-inputs "bash")
562 "/bin/bash")
563 "PKGDIR=libdde_linux26"
564 ,@(if (%current-target-system)
565 (list "CC=i586-pc-gnu-gcc"
566 "LINK_PROGRAM=i586-pc-gnu-gcc")
567 (list "CC=gcc")))
568 #:configure-flags
569 (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
570 #:phases
571 (modify-phases %standard-phases
572 (delete 'configure)
573 (add-after 'unpack 'prepare-dde
574 (lambda* (#:key native-inputs inputs #:allow-other-keys)
575 (for-each make-file-writable (find-files "."))
576 (let ((dde (or (assoc-ref inputs "dde-sources")
577 (assoc-ref native-inputs "dde-sources"))))
578 (for-each (lambda (dir)
579 (copy-recursively
580 (string-append dde "/" dir ) dir))
581 '("libdde_linux26" "libddekit")))
582 (substitute* "libdde_linux26/mk/rel2abs.sh"
583 (("/bin/bash") (which "bash")))
584 #t))
585 (add-after 'patch-generated-file-shebangs 'build-libdde-linux26
586 (lambda* (#:key make-flags #:allow-other-keys)
587 (with-directory-excursion "libdde_linux26"
588 (apply invoke "make"
589 (delete "PKGDIR=libdde_linux26" make-flags)))))
590 (add-after 'build-libdde-linux26 'convert
591 (lambda* (#:key make-flags #:allow-other-keys)
592 (apply invoke "make" "convert" make-flags)))
593 (replace 'build
594 (lambda* (#:key make-flags #:allow-other-keys)
595 ;; no-common can be dropped with GCC 10+ where this is the
596 ;; default.
597 (apply invoke "make" "CFLAGS=-fno-common" make-flags)))
598 (replace 'install
599 (lambda* (#:key outputs #:allow-other-keys)
600 (install-file "netdde"
601 (string-append (assoc-ref outputs "out")
602 "/bin"))
603 #t)))))
604 (inputs
605 `(("hurd" ,hurd)
606 ("libpciaccess" ,libpciaccess)
607 ("zlib" ,zlib)))
608 (native-inputs
609 `(("coreutils" ,coreutils)
610 ("gawk" ,gawk)
611 ("grep" ,grep)
612 ("perl" ,perl)
613 ("sed" ,sed)
614 ("dde-sources" ,dde-sources)))
615 (supported-systems %hurd-systems)
616 (home-page "https://www.gnu.org/software/hurd/hurd.html")
617 (synopsis "Linux network drivers glued by the DDE layer")
618 (description
619 "This package provides Linux 2.6 network drivers that can be embedded
620 in userland processes thanks to the DDE layer.")
621 ;; Some drivers are dually licensed with the options being GPLv2 or one
622 ;; of MPL/Expat/BSD-3 (dependent on the driver).
623 (license gpl2))))