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