gnu: Remove python2-pyaudio.
[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-2022 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, 2022 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 onc-rpc)
48 #:use-module (gnu packages xorg) ; libpciaccess
49 #:use-module (guix git-download)
50 #:export (hurd-system?
51 hurd-target?))
52
53 (define (hurd-target?)
54 "Return true if the cross-compilation target or the current system is
55 GNU/Hurd."
56 (or (and=> (%current-target-system) target-hurd?)
57 (and (not (%current-target-system))
58 (and=> (%current-system) target-hurd?))))
59
60 (define (hurd-system?)
61 "Return true if the current system is the Hurd."
62 (and=> (%current-system) target-hurd?))
63
64 (define (hurd-source-url version)
65 (string-append "mirror://gnu/hurd/hurd-"
66 version ".tar.gz"))
67
68 (define-public gnumach-headers
69 (let ((commit "097f9cf735ffa1212b828682ad92f0f6c5f1c552")
70 (revision "1"))
71 (package
72 (name "gnumach-headers")
73 (version (git-version "1.8" revision commit))
74 (source
75 (origin
76 (method git-fetch)
77 (uri (git-reference
78 (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
79 (commit commit)))
80 (file-name (git-file-name "gnumach" version))
81 (sha256
82 (base32
83 "0q36z7k02bykrld90zaxbhyzxlmwlqqs4divgir6ix38zsp6icqk"))))
84 (build-system gnu-build-system)
85 (arguments
86 `(#:phases
87 (modify-phases %standard-phases
88 (replace 'install
89 (lambda _
90 (invoke "make" "install-data")))
91 (delete 'build))
92
93 ;; GNU Mach supports only IA32 currently, so cheat so that we can at
94 ;; least install its headers.
95 ,@(if (%current-target-system)
96 '()
97 ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
98 ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
99 '(#:configure-flags '("--build=i586-pc-gnu"
100 "--host=i686-linux-gnu")))
101
102 #:tests? #f))
103 (native-inputs
104 (list autoconf automake texinfo-4))
105 (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
106 (synopsis "GNU Mach kernel headers")
107 (description
108 "Headers of the GNU Mach kernel.")
109 (license gpl2+))))
110
111 (define-public mig
112 (package
113 (name "mig")
114 (version "1.8")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "mirror://gnu/mig/mig-"
119 version ".tar.gz"))
120 (sha256
121 (base32
122 "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
123 (build-system gnu-build-system)
124 ;; Flex is needed both at build and run time.
125 (inputs (list gnumach-headers flex perl))
126 (native-inputs
127 (list flex bison))
128 (arguments `(#:tests? #f
129 #:phases
130 (modify-phases %standard-phases
131 (add-after 'install 'patch-non-shebang-references
132 (lambda* (#:key build inputs outputs #:allow-other-keys)
133 (let ((perl (assoc-ref inputs "perl"))
134 (out (assoc-ref outputs "out")))
135 (substitute* (string-append out "/bin/mig")
136 (("perl ") (string-append perl "/bin/perl ")))
137 #t))))))
138 (home-page "https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
139 (synopsis "Mach 3.0 interface generator for the Hurd")
140 (description
141 "GNU MIG is the GNU distribution of the Mach 3.0 interface generator
142 MIG, as maintained by the GNU Hurd developers for the GNU project.
143 You need this tool to compile the GNU Mach and GNU Hurd distributions,
144 and to compile the GNU C library for the Hurd. Also, you will need it
145 for other software in the GNU system that uses Mach-based inter-process
146 communication.")
147 (license gpl2+)))
148
149 (define-public mig/32-bit
150 ;; When cross-compiling from x86_64-linux to i586-gnu, we need this 32-bit
151 ;; native MIG.
152 (package
153 (inherit mig)
154 (arguments
155 (substitute-keyword-arguments (package-arguments mig)
156 ((#:system _ #f)
157 "i686-linux")))
158 (properties `((hidden? . #t)))))
159
160 (define-public hurd-headers
161 ;; Resort to a post-0.9 snapshot that provides the 'file_utimens' and
162 ;; 'file_exec_paths' RPCs that glibc 2.28 expects.
163 (let ((revision "1")
164 (commit "91a51672ff4cfe1f1a0712b4c542ded3081c825b"))
165 (package
166 (name "hurd-headers")
167 (version (git-version "0.9" revision commit))
168 (source (origin
169 (method git-fetch)
170 (uri (git-reference
171 (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
172 (commit commit)))
173 (sha256
174 (base32
175 "16k9wkahz9wasviijz53n6i13nmiwa9fs64ikf1jqh8rl60hw7cz"))
176 (file-name (git-file-name name version))))
177 (build-system gnu-build-system)
178 (native-inputs
179 (list mig autoconf automake))
180 (arguments
181 `(#:phases
182 (modify-phases %standard-phases
183 (replace 'install
184 (lambda _
185 (invoke "make" "install-headers" "no_deps=t")))
186 (delete 'build))
187
188 #:configure-flags '( ;; Pretend we're on GNU/Hurd; 'configure' wants
189 ;; that.
190 ,@(if (%current-target-system)
191 '()
192 '("--host=i586-pc-gnu"))
193
194 ;; Reduce set of dependencies.
195 "--without-parted"
196 "--disable-ncursesw"
197 "--disable-test"
198 "--without-libbz2"
199 "--without-libcrypt"
200 "--without-libz"
201 ;; Skip the clnt_create check because it expects
202 ;; a working glibc causing a circular dependency.
203 "ac_cv_search_clnt_create=no"
204
205 ;; Annihilate the checks for the 'file_exec_paths'
206 ;; & co. libc functions to avoid "link tests are
207 ;; not allowed after AC_NO_EXECUTABLES" error.
208 "ac_cv_func_file_exec_paths=no"
209 "ac_cv_func_exec_exec_paths=no"
210 "ac_cv_func__hurd_exec_paths=no"
211 "ac_cv_func_file_futimens=no")
212
213 #:tests? #f))
214 (home-page "https://www.gnu.org/software/hurd/hurd.html")
215 (synopsis "GNU Hurd headers")
216 (description
217 "This package provides C headers of the GNU Hurd, used to build the GNU C
218 Library and other user programs.")
219 (license gpl2+))))
220
221 (define-public hurd-minimal
222 (package (inherit hurd-headers)
223 (name "hurd-minimal")
224 (inputs (list glibc/hurd-headers))
225 (arguments
226 (substitute-keyword-arguments (package-arguments hurd-headers)
227 ((#:phases _)
228 '(modify-phases %standard-phases
229 (replace 'install
230 (lambda* (#:key outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out")))
232 ;; We need to copy libihash.a to the output directory manually,
233 ;; since there is no target for that in the makefile.
234 (mkdir-p (string-append out "/include"))
235 (copy-file "libihash/ihash.h"
236 (string-append out "/include/ihash.h"))
237 (mkdir-p (string-append out "/lib"))
238 (copy-file "libihash/libihash.a"
239 (string-append out "/lib/libihash.a"))
240 #t)))
241 (replace 'build
242 (lambda _
243 ;; Install <assert-backtrace.h> & co.
244 (invoke "make" "-Clibshouldbeinlibc"
245 "../include/assert-backtrace.h")
246
247 ;; Build libihash.
248 (invoke "make" "-Clibihash" "libihash.a")))))))
249 (home-page "https://www.gnu.org/software/hurd/hurd.html")
250 (synopsis "GNU Hurd libraries")
251 (description
252 "This package provides libihash, needed to build the GNU C
253 Library for GNU/Hurd.")
254 (license gpl2+)))
255
256 (define-public hurd-core-headers
257 (package
258 (name "hurd-core-headers")
259 (version (package-version hurd-headers))
260 (source #f)
261 (build-system trivial-build-system)
262 (arguments
263 '(#:modules ((guix build union))
264 #:builder (begin
265 (use-modules (srfi srfi-1)
266 (srfi srfi-26)
267 (ice-9 match)
268 (guix build union))
269 (let ((inputs (filter
270 (compose (cute member <> '("gnumach-headers"
271 "hurd-headers"
272 "hurd-minimal"))
273 car)
274 %build-inputs)))
275 (match inputs
276 (((names . directories) ...)
277 (union-build (assoc-ref %outputs "out")
278 directories)
279 #t))))))
280 (inputs (list gnumach-headers hurd-headers hurd-minimal))
281 (synopsis "Union of the Hurd headers and libraries")
282 (description
283 "This package contains the union of the Mach and Hurd headers and the
284 Hurd-minimal package which are needed for both glibc and GCC.")
285 (home-page (package-home-page hurd-headers))
286 (license (package-license hurd-headers))))
287
288 (define-public gnumach
289 (package
290 (inherit gnumach-headers)
291 (name "gnumach")
292 (arguments
293 (substitute-keyword-arguments (package-arguments gnumach-headers)
294 ((#:make-flags flags ''())
295 `(cons "CFLAGS=-fcommon" ,flags))
296 ((#:configure-flags flags ''())
297 `(cons "--enable-kdb" ,flags)) ;enable kernel debugger
298 ((#:phases phases '%standard-phases)
299 `(modify-phases %standard-phases
300 (add-after 'install 'produce-image
301 (lambda* (#:key outputs #:allow-other-keys)
302 (let* ((out (assoc-ref outputs "out"))
303 (boot (string-append out "/boot")))
304 (invoke "make" "gnumach.gz")
305 (install-file "gnumach.gz" boot))))))))
306 (native-inputs
307 (list mig perl autoconf automake texinfo-4))
308 (supported-systems (cons "i686-linux" %hurd-systems))
309 (synopsis "Microkernel of the GNU system")
310 (description
311 "GNU Mach is the microkernel upon which a GNU Hurd system is based.")))
312
313 (define unifont
314 ;; GNU Unifont, <http://gnu.org/s/unifont>.
315 ;; Used the the VGA driver of the Hurd's console client.
316 (origin
317 (method url-fetch)
318 (uri
319 "http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.bdf.gz")
320 (sha256
321 (base32
322 "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
323
324 (define dde-sources
325 ;; This is the current tip of the dde branch
326 (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136"))
327 (origin
328 (method git-fetch)
329 (uri (git-reference
330 (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
331 (commit commit)))
332 (sha256
333 (base32
334 "1vryinbg75xpydfrv9dbgfnds6knlh8l8bk2rxp32y9dc58z0692"))
335 (file-name (git-file-name "dde" commit)))))
336
337 (define-public hurd
338 (package
339 (name "hurd")
340 (version (package-version hurd-headers))
341 (source (origin (inherit (package-source hurd-headers))
342 (patches (search-patches "hurd-cross.patch"
343 "hurd-xattr.patch"))))
344 (arguments
345 `(#:phases
346 (modify-phases %standard-phases
347 (add-after 'unpack 'prepare-dde
348 (lambda* (#:key native-inputs inputs #:allow-other-keys)
349 (substitute* "Makefile"
350 (("libbpf ")
351 "libbpf libmachdev libmachdevdde libddekit"))
352 (for-each make-file-writable (find-files "."))
353 (let ((dde (or (assoc-ref inputs "dde-sources")
354 (assoc-ref native-inputs "dde-sources"))))
355 (for-each (lambda (dir)
356 (copy-recursively
357 (string-append dde "/" dir ) dir))
358 '("libmachdev" "libmachdevdde" "libddekit")))
359 #t))
360 (add-after 'unpack 'find-tirpc
361 (lambda* (#:key inputs #:allow-other-keys)
362 (for-each (lambda (var)
363 (setenv var
364 (string-append
365 (search-input-directory inputs
366 "include/tirpc")
367 ":" (or (getenv var) ""))))
368 '("CROSS_C_INCLUDE_PATH" "C_INCLUDE_PATH"
369 "CROSS_CPATH" "CPATH"))
370 #t))
371 (add-after 'unpack 'fix-rpc-headers
372 (lambda _
373 (substitute* "nfs/mount.c"
374 (("#undef (TRUE|FALSE)") "")
375 (("#include <rpc/pmap_prot.h>" m)
376 (string-append "#include <rpc/xdr.h>\n" m)))
377 (substitute* '("nfsd/cache.c")
378 (("#undef (TRUE|FALSE)") ""))
379 (substitute* '("nfsd/loop.c"
380 "nfsd/main.c"
381 "nfsd/ops.c")
382 (("#include <rpc/pmap_prot.h>" m)
383 (string-append "#include <rpc/types.h>\n#include <rpc/xdr.h>\n" m)))
384 #t))
385 (add-before 'build 'pre-build
386 (lambda _
387 ;; Don't change the ownership of any file at this time.
388 (substitute* '("daemons/Makefile" "utils/Makefile")
389 (("-o root -m 4755") ""))
390 #t))
391 (add-after 'unpack 'create-runsystem
392 (lambda _
393 ;; XXX Work towards having startup.c invoke the Guile rc
394 (delete-file "daemons/runsystem.sh")
395 (with-output-to-file "daemons/runsystem.sh"
396 (lambda _
397 (display "#! /bin/bash
398
399 # XXX Guile needs pipe support for its finalizer thread, to start.
400 # Remove this script when Linux and the Hurd have xattr patches.
401 PATH=@PATH@
402
403 fsck --yes --force /
404 fsysopts / --writable
405
406 # Note: this /hurd/ gets substituted
407 settrans --create /servers/socket/1 /hurd/pflocal
408
409 # parse multiboot arguments
410 for i in \"$@\"; do
411 case $i in
412 (gnu.system=*)
413 system=${i#gnu.system=}
414 ;;
415 esac
416 done
417
418 echo Starting ${system}/rc...
419 exec ${system}/rc \"$@\"
420 ")))))
421 (add-before 'build 'set-file-names
422 (lambda* (#:key inputs outputs #:allow-other-keys)
423 (let* ((out (assoc-ref outputs "out"))
424 (bash (assoc-ref inputs "bash-minimal"))
425 (coreutils (assoc-ref inputs "coreutils"))
426 (sed (assoc-ref inputs "sed"))
427 (grep (assoc-ref inputs "grep"))
428 (util-linux (assoc-ref inputs "util-linux")))
429 (substitute* '("daemons/runttys.c" "daemons/getty.c" "utils/login.c")
430 (("/bin/login")
431 (string-append out "/bin/login"))
432 (("/bin/bash") (string-append bash "/bin/bash")))
433 (substitute* '("startup/startup.c" "config/ttys")
434 (("/libexec/")
435 (string-append out "/libexec/")))
436 (substitute* '("utils/uptime.sh")
437 (("/bin/w")
438 (string-append out "/bin/w")))
439 ;; Upon first boot the /hurd symlink does not exist; it is
440 ;; created during activation: Hard-code the .../hurd store file
441 ;; name.
442 (substitute* '("boot/boot.c"
443 "daemons/console-run.c"
444 "startup/startup.c")
445 (("/hurd/")
446 (string-append out "/hurd/")))
447 (substitute* '("libdiskfs/boot-start.c"
448 "libdiskfs/opts-std-startup.c")
449 (("_HURD_STARTUP")
450 (string-append "\"" out "/hurd/startup\"")))
451 (substitute* '("daemons/runsystem.sh"
452 "utils/fakeroot.sh"
453 "utils/remap.sh"
454 "sutils/MAKEDEV.sh"
455 "sutils/losetup.sh")
456 (("^PATH=.*")
457 (string-append "PATH=" out "/bin"
458 ":" out "/sbin"
459 ":" coreutils "/bin"
460 ":" grep "/bin"
461 ":" sed "/bin"
462 ":" util-linux "/sbin\n"))
463 (("/sbin/") (string-append out "/sbin/"))
464 (("/libexec/") (string-append out "/libexec/"))
465 (("/hurd/") (string-append out "/hurd/")))
466 #t)))
467 (add-after 'patch-shebangs 'patch-libexec-shebangs
468 (lambda* (#:key inputs outputs #:allow-other-keys)
469 ;; XXX: Since the 'patch-shebangs' phase doesn't traverse
470 ;; /libexec, do it here.
471 (let* ((out (assoc-ref outputs "out"))
472 (bash (assoc-ref inputs "bash-minimal"))
473 (path (list (string-append bash "/bin"))))
474 (for-each (lambda (file)
475 (patch-shebang file path))
476 (find-files (string-append out "/libexec")))
477 #t)))
478 (add-after 'install 'install-goodies
479 (lambda* (#:key inputs outputs #:allow-other-keys)
480 ;; Install additional goodies.
481 ;; TODO: Build & install *.msgids for rpctrace.
482 (let* ((out (assoc-ref outputs "out"))
483 (datadir (string-append out "/share/hurd")))
484 ;; Install the fancy UTF-8 motd.
485 (mkdir-p (string-append out "/etc"))
486 (copy-file "console/motd.UTF8"
487 (string-append out "/etc/motd"))
488
489 ;; Install the BDF font for use by the console client.
490 (copy-file (assoc-ref inputs "unifont")
491 "unifont.gz")
492 (invoke "gunzip" "unifont.gz")
493 (mkdir-p datadir)
494 (copy-file "unifont"
495 (string-append datadir "/vga-system.bdf"))
496 #t))))
497 #:configure-flags
498 ,#~(list (string-append "LDFLAGS=-Wl,-rpath="
499 #$output "/lib")
500 "--disable-ncursesw"
501 "--without-libbz2"
502 "--without-libz"
503 "--without-parted"
504 ;; This is needed to pass the configure check for
505 ;; clnt_create
506 "ac_func_search_save_LIBS=-ltirpc"
507 "ac_cv_search_clnt_create=false"
508 "CFLAGS=-fcommon")))
509 (build-system gnu-build-system)
510 (inputs
511 `(("glibc-hurd-headers" ,glibc/hurd-headers)
512
513 ("libgcrypt" ,libgcrypt) ;for /hurd/random
514 ("libdaemon" ,libdaemon) ;for /bin/console --daemonize
515 ("unifont" ,unifont)
516 ("libpciaccess" ,libpciaccess)
517
518 ;; For NFS support
519 ("libtirpc" ,libtirpc/hurd)
520
521 ;; Tools for the /libexec/* scripts.
522 ("bash-minimal" ,bash-minimal)
523 ("coreutils" ,coreutils)
524 ("sed" ,sed)
525 ("grep" ,grep)
526 ("util-linux" ,util-linux)))
527 (native-inputs
528 `(("autoconf" ,autoconf)
529 ("automake" ,automake)
530 ("libgcrypt" ,libgcrypt) ;for 'libgcrypt-config'
531 ("pkg-config" ,pkg-config)
532 ("mig" ,(if (%current-target-system)
533 ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
534 ;; hence this hack.
535 mig/32-bit
536 mig))
537 ("perl" ,perl)
538 ("texinfo" ,texinfo-4)
539 ("dde-sources" ,dde-sources)))
540 (supported-systems %hurd-systems)
541 (home-page "https://www.gnu.org/software/hurd/hurd.html")
542 (synopsis "The kernel servers for the GNU operating system")
543 (description
544 "The Hurd is the kernel for the GNU system, a replacement and
545 augmentation of standard Unix kernels. It is a collection of protocols for
546 system interaction (file systems, networks, authentication), and servers
547 implementing them.")
548 (license gpl2+)))
549
550 (define-public netdde
551 (let ((commit "4a1016f130b6f2065d3f088325e5fb0b2997ae12")
552 (revision "1"))
553 (package
554 (name "netdde")
555 ;; The version prefix corresponds to the version of Linux from which the
556 ;; drivers were taken.
557 (version (git-version "2.6.32.65" revision commit))
558 (source (origin
559 (method git-fetch)
560 (uri (git-reference
561 (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
562 (commit commit)))
563 (sha256
564 (base32
565 "1njv9dszq4lj05yq4v9j5v247hfghpzvvz4hzy0khjjr35mw7hr8"))
566 (file-name (git-file-name name commit))))
567 (build-system gnu-build-system)
568 (arguments
569 `(#:make-flags
570 (list (string-append "SHELL="
571 (search-input-file %build-inputs "/bin/bash"))
572 "PKGDIR=libdde_linux26"
573 ,@(if (%current-target-system)
574 (list "CC=i586-pc-gnu-gcc"
575 "LINK_PROGRAM=i586-pc-gnu-gcc")
576 (list "CC=gcc")))
577 #:configure-flags
578 ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
579 #:phases
580 (modify-phases %standard-phases
581 (delete 'configure)
582 (add-after 'unpack 'prepare-dde
583 (lambda* (#:key native-inputs inputs #:allow-other-keys)
584 (for-each make-file-writable (find-files "."))
585 (let ((dde (or (assoc-ref inputs "dde-sources")
586 (assoc-ref native-inputs "dde-sources"))))
587 (for-each (lambda (dir)
588 (copy-recursively
589 (string-append dde "/" dir ) dir))
590 '("libdde_linux26" "libddekit")))
591 (substitute* "libdde_linux26/mk/rel2abs.sh"
592 (("/bin/bash") (which "bash")))
593 #t))
594 (add-after 'patch-generated-file-shebangs 'build-libdde-linux26
595 (lambda* (#:key make-flags #:allow-other-keys)
596 (with-directory-excursion "libdde_linux26"
597 (apply invoke "make"
598 (delete "PKGDIR=libdde_linux26" make-flags)))))
599 (add-after 'build-libdde-linux26 'convert
600 (lambda* (#:key make-flags #:allow-other-keys)
601 (apply invoke "make" "convert" make-flags)))
602 (replace 'build
603 (lambda* (#:key make-flags #:allow-other-keys)
604 ;; no-common can be dropped with GCC 10+ where this is the
605 ;; default.
606 (apply invoke "make" "CFLAGS=-fno-common" make-flags)))
607 (replace 'install
608 (lambda* (#:key outputs #:allow-other-keys)
609 (install-file "netdde"
610 (string-append (assoc-ref outputs "out")
611 "/bin"))
612 #t)))))
613 (inputs
614 (list hurd libpciaccess zlib))
615 (native-inputs
616 `(("coreutils" ,coreutils)
617 ("gawk" ,gawk)
618 ("grep" ,grep)
619 ("perl" ,perl)
620 ("sed" ,sed)
621 ("dde-sources" ,dde-sources)))
622 (supported-systems %hurd-systems)
623 (home-page "https://www.gnu.org/software/hurd/hurd.html")
624 (synopsis "Linux network drivers glued by the DDE layer")
625 (description
626 "This package provides Linux 2.6 network drivers that can be embedded
627 in userland processes thanks to the DDE layer.")
628 ;; Some drivers are dually licensed with the options being GPLv2 or one
629 ;; of MPL/Expat/BSD-3 (dependent on the driver).
630 (license gpl2))))