| 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 | (define-module (gnu packages hurd)
|
| 28 | #:use-module ((guix licenses) #:hide (zlib))
|
| 29 | #:use-module (guix download)
|
| 30 | #:use-module (guix packages)
|
| 31 | #:use-module (gnu packages)
|
| 32 | #:use-module (guix gexp)
|
| 33 | #:use-module (guix utils)
|
| 34 | #:use-module (guix build-system gnu)
|
| 35 | #:use-module (guix build-system trivial)
|
| 36 | #:use-module (gnu packages autotools)
|
| 37 | #:use-module (gnu packages compression)
|
| 38 | #:use-module (gnu packages cross-base)
|
| 39 | #:use-module (gnu packages crypto)
|
| 40 | #:use-module (gnu packages disk)
|
| 41 | #:use-module (gnu packages compiler-tools)
|
| 42 | #:use-module (gnu packages gawk)
|
| 43 | #:use-module (gnu packages gnupg)
|
| 44 | #:use-module (gnu packages bison)
|
| 45 | #:use-module (gnu packages libdaemon)
|
| 46 | #:use-module (gnu packages linux)
|
| 47 | #:use-module (gnu packages perl)
|
| 48 | #:use-module (gnu packages pkg-config)
|
| 49 | #:use-module (gnu packages base)
|
| 50 | #:use-module (gnu packages bash)
|
| 51 | #:use-module (gnu packages texinfo)
|
| 52 | #:use-module (gnu packages onc-rpc)
|
| 53 | #:use-module (gnu packages xorg) |
| 54 | #:use-module (guix git-download)
|
| 55 | #:use-module (ice-9 match))
|
| 56 |
|
| 57 | (define (hurd-source-url version)
|
| 58 | (string-append "mirror://gnu/hurd/hurd-"
|
| 59 | version ".tar.gz"))
|
| 60 |
|
| 61 | (define-public gnumach-headers
|
| 62 | (package
|
| 63 | (name "gnumach-headers")
|
| 64 | (version "1.8+git20260224")
|
| 65 | (source
|
| 66 | (origin
|
| 67 | (method git-fetch)
|
| 68 | (uri (git-reference
|
| 69 | (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
|
| 70 | (commit (string-append "v" version))))
|
| 71 | (patches (search-patches "gnumach-version.patch"))
|
| 72 | (file-name (git-file-name "gnumach" version))
|
| 73 | (sha256
|
| 74 | (base32 "08s3a8fr4pax66n3v2darjzi2vgab30k1siqq9djdaa0r0ssnai8"))))
|
| 75 | (build-system gnu-build-system)
|
| 76 | (arguments
|
| 77 | `(#:phases
|
| 78 | (modify-phases %standard-phases
|
| 79 | (replace 'install
|
| 80 | (lambda _
|
| 81 | (invoke "make" "install-data" "install-data-hook")))
|
| 82 | (delete 'build))
|
| 83 | #:tests? #f))
|
| 84 | (native-inputs
|
| 85 | (list autoconf automake texinfo))
|
| 86 | (supported-systems %hurd-systems)
|
| 87 | (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
|
| 88 | (synopsis "GNU Mach kernel headers")
|
| 89 | (description
|
| 90 | "Headers of the GNU Mach kernel.")
|
| 91 | (license gpl2+)))
|
| 92 |
|
| 93 | (define-public mig
|
| 94 | (let ((revision "1")
|
| 95 | (commit "3f4b0062963fca5d90fc65c1d7912ecdc21a8fed"))
|
| 96 | (package
|
| 97 | (name "mig")
|
| 98 | (version (git-version "1.8+git20231217" revision commit))
|
| 99 | (source (origin
|
| 100 | (method git-fetch)
|
| 101 | (uri (git-reference
|
| 102 | (url "https://git.savannah.gnu.org/git/hurd/mig.git")
|
| 103 | (commit commit)))
|
| 104 | (file-name (git-file-name name version))
|
| 105 | (sha256
|
| 106 | (base32
|
| 107 | "0fj5vwl93z0wmy20x6cs2av2c956w0k8glqsc8dzb3s8km7j7akq"))))
|
| 108 | (build-system gnu-build-system)
|
| 109 | |
| 110 | (inputs (list gnumach-headers flex))
|
| 111 | (native-inputs (list autoconf automake flex bison))
|
| 112 | (arguments
|
| 113 | (list #:tests? #f
|
| 114 | #:phases
|
| 115 | #~(modify-phases %standard-phases
|
| 116 | (add-after 'install 'avoid-perl-dependency
|
| 117 | (lambda* (#:key build inputs outputs #:allow-other-keys)
|
| 118 | (let* ((out (assoc-ref outputs "out"))
|
| 119 | (bin (string-append out "/bin")))
|
| 120 | |
| 121 | |
| 122 | (substitute* (find-files bin "mig$")
|
| 123 | (("^libexecdir_rel=.*")
|
| 124 | "libexecdir_rel=../libexec\n"))))))))
|
| 125 | (home-page "https://www.gnu.org/software/hurd/microkernel/mach/mig/gnu_mig.html")
|
| 126 | (synopsis "Mach 3.0 interface generator for the Hurd")
|
| 127 | (description
|
| 128 | "GNU MIG is the GNU distribution of the Mach 3.0 interface generator
|
| 129 | MIG, as maintained by the GNU Hurd developers for the GNU project.
|
| 130 | You need this tool to compile the GNU Mach and GNU Hurd distributions,
|
| 131 | and to compile the GNU C library for the Hurd. Also, you will need it
|
| 132 | for other software in the GNU system that uses Mach-based inter-process
|
| 133 | communication.")
|
| 134 | (license gpl2+))))
|
| 135 |
|
| 136 | (define-public hurd-headers
|
| 137 | (let ((commit "6290b4cf92963f64ffa447cdaba099812c80fbfb")
|
| 138 | (revision "0"))
|
| 139 | (package
|
| 140 | (name "hurd-headers")
|
| 141 | (version (git-version "0.9.git20251029" revision commit))
|
| 142 | (source (origin
|
| 143 | (method git-fetch)
|
| 144 | (uri (git-reference
|
| 145 | (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
|
| 146 | (commit commit)))
|
| 147 | (sha256
|
| 148 | (base32
|
| 149 | "0lkmxw2016isb80k8pjjr64il6irgwsqgd3634f79bry2fabhbdj"))
|
| 150 | (file-name (git-file-name name version))))
|
| 151 | (build-system gnu-build-system)
|
| 152 | (native-inputs
|
| 153 | (list autoconf
|
| 154 | automake
|
| 155 | (if (%current-target-system)
|
| 156 | (cross-mig (%current-target-system))
|
| 157 | mig)))
|
| 158 | (arguments
|
| 159 | `(#:phases
|
| 160 | (modify-phases %standard-phases
|
| 161 | (replace 'install
|
| 162 | (lambda _
|
| 163 | (invoke "make" "install-headers" "no_deps=t")))
|
| 164 | (delete 'build))
|
| 165 |
|
| 166 | #:configure-flags '( |
| 167 | "--without-parted"
|
| 168 | "--disable-ncursesw"
|
| 169 | "--disable-test"
|
| 170 | "--without-libbz2"
|
| 171 | "--without-libcrypt"
|
| 172 | "--without-libz"
|
| 173 | "--without-rump"
|
| 174 | |
| 175 | |
| 176 | "ac_cv_search_clnt_create=no"
|
| 177 |
|
| 178 | |
| 179 | |
| 180 | |
| 181 | "ac_cv_func_file_exec_paths=no"
|
| 182 | "ac_cv_func_exec_exec_paths=no"
|
| 183 | "ac_cv_func__hurd_exec_paths=no"
|
| 184 | "ac_cv_func__hurd_libc_proc_init=no"
|
| 185 | "ac_cv_func_mach_port_set_ktype=no"
|
| 186 | "ac_cv_func_file_futimens=no"
|
| 187 | "ac_cv_func_file_utimens=no"
|
| 188 | "ac_cv_lib_acpica_acpi_init=no")
|
| 189 |
|
| 190 | #:tests? #f))
|
| 191 | (supported-systems %hurd-systems)
|
| 192 | (home-page "https://www.gnu.org/software/hurd/hurd.html")
|
| 193 | (synopsis "GNU Hurd headers")
|
| 194 | (description
|
| 195 | "This package provides C headers of the GNU Hurd, used to build the GNU C
|
| 196 | Library and other user programs.")
|
| 197 | (license gpl2+))))
|
| 198 |
|
| 199 | (define-public hurd-minimal
|
| 200 | (package (inherit hurd-headers)
|
| 201 | (name "hurd-minimal")
|
| 202 | (inputs (list glibc/hurd-headers gnumach-headers))
|
| 203 | (arguments
|
| 204 | (substitute-keyword-arguments arguments
|
| 205 | ((#:make-flags flags '())
|
| 206 | #~'(#$(string-append "lib-subdirs=libshouldbeinlibc libihash libstore")
|
| 207 | "prog-subdirs="
|
| 208 | "other-subdirs="
|
| 209 | #$@flags))
|
| 210 | ((#:phases _)
|
| 211 | #~%standard-phases)
|
| 212 | ((#:validate-runpath? validate-runpath? #f)
|
| 213 | #f)))
|
| 214 | (supported-systems %hurd-systems)
|
| 215 | (home-page "https://www.gnu.org/software/hurd/hurd.html")
|
| 216 | (synopsis "GNU Hurd libraries")
|
| 217 | (description
|
| 218 | "This package provides libshouldbeinlibc, libihash, libstore, libports,
|
| 219 | libiohelp, libfshelp, libtrivfs, and libmachdev, needed to build the GNU C
|
| 220 | Library, Parted and netdde for GNU/Hurd.")
|
| 221 | (license gpl2+)))
|
| 222 |
|
| 223 | (define-public libirqhelp
|
| 224 | (package (inherit hurd-headers)
|
| 225 | (name "libirqhelp")
|
| 226 | (arguments
|
| 227 | (substitute-keyword-arguments arguments
|
| 228 | ((#:make-flags flags '())
|
| 229 | #~'(#$(string-append "lib-subdirs=libirqhelp")
|
| 230 | "prog-subdirs="
|
| 231 | "other-subdirs="
|
| 232 | #$@flags))
|
| 233 | ((#:phases _)
|
| 234 | #~%standard-phases)))
|
| 235 | (supported-systems %hurd-systems)
|
| 236 | (synopsis "Hurd helper library for userspace IRQ handling")
|
| 237 | (description
|
| 238 | "This package provides libirqhelp, a GNU Hurd helper library to handle
|
| 239 | @acronym{IRQs, interrupt requests} in user space.")
|
| 240 | (license gpl2+)))
|
| 241 |
|
| 242 | (define-public hurd-core-headers
|
| 243 | (package
|
| 244 | (name "hurd-core-headers")
|
| 245 | (version (package-version hurd-headers))
|
| 246 | (source #f)
|
| 247 | (build-system trivial-build-system)
|
| 248 | (arguments
|
| 249 | '(#:modules ((guix build union))
|
| 250 | #:builder (begin
|
| 251 | (use-modules (srfi srfi-1)
|
| 252 | (srfi srfi-26)
|
| 253 | (ice-9 match)
|
| 254 | (guix build union))
|
| 255 | (let ((inputs (filter
|
| 256 | (compose (cute member <> '("gnumach-headers"
|
| 257 | "hurd-headers"
|
| 258 | "hurd-minimal"))
|
| 259 | car)
|
| 260 | %build-inputs)))
|
| 261 | (match inputs
|
| 262 | (((names . directories) ...)
|
| 263 | (union-build (assoc-ref %outputs "out")
|
| 264 | directories)
|
| 265 | #t))))))
|
| 266 | (inputs (list gnumach-headers hurd-headers hurd-minimal))
|
| 267 | (supported-systems %hurd-systems)
|
| 268 | (synopsis "Union of the Hurd headers and libraries")
|
| 269 | (description
|
| 270 | "This package contains the union of the Mach and Hurd headers and the
|
| 271 | Hurd-minimal package which are needed for both glibc and GCC.")
|
| 272 | (home-page (package-home-page hurd-headers))
|
| 273 | (license (package-license hurd-headers))))
|
| 274 |
|
| 275 | (define-public gnumach
|
| 276 | (package
|
| 277 | (inherit gnumach-headers)
|
| 278 | (name "gnumach")
|
| 279 | (arguments
|
| 280 | (substitute-keyword-arguments arguments
|
| 281 | ((#:configure-flags flags ''())
|
| 282 | `(cons* "--enable-kdb" |
| 283 | "--disable-net-group"
|
| 284 | "--disable-pcmcia-group"
|
| 285 | "--disable-wireless-group"
|
| 286 | ,flags))
|
| 287 | ((#:phases phases '%standard-phases)
|
| 288 | #~(modify-phases %standard-phases
|
| 289 | (add-after 'install 'produce-image
|
| 290 | (lambda _
|
| 291 | (let ((boot (string-append #$output "/boot")))
|
| 292 | (invoke "make" "gnumach.gz")
|
| 293 | (install-file "gnumach.gz" boot))))))))
|
| 294 | (native-inputs
|
| 295 | (list autoconf
|
| 296 | automake
|
| 297 | (if (%current-target-system)
|
| 298 | (cross-mig (%current-target-system))
|
| 299 | mig)
|
| 300 | perl
|
| 301 | texinfo))
|
| 302 | (supported-systems `("i686-linux" ,@%hurd-systems))
|
| 303 | (synopsis "Microkernel of the GNU system")
|
| 304 | (description
|
| 305 | "GNU Mach is the microkernel upon which a GNU Hurd system is based.")))
|
| 306 |
|
| 307 | (define unifont
|
| 308 | |
| 309 | |
| 310 | (origin
|
| 311 | (method url-fetch)
|
| 312 | (uri
|
| 313 | "http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.bdf.gz")
|
| 314 | (sha256
|
| 315 | (base32
|
| 316 | "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys"))))
|
| 317 |
|
| 318 | (define dde-sources
|
| 319 | |
| 320 | (let ((commit "b6c8526c703f3ba76294d9002f195c63897ec661"))
|
| 321 | (origin
|
| 322 | (method git-fetch)
|
| 323 | (uri (git-reference
|
| 324 | (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
|
| 325 | (commit commit)))
|
| 326 | (sha256
|
| 327 | (base32
|
| 328 | "0k1ilj8ghli8x43xaksbc4y419pqh0w16k374914c07svq419bbr"))
|
| 329 | (file-name (git-file-name "dde" (string-take commit 7))))))
|
| 330 |
|
| 331 | (define %import-from-dde
|
| 332 | (list "libmachdevdde" "libddekit" "libdde_linux26"))
|
| 333 |
|
| 334 | (define %add-to-hurd-subdirs
|
| 335 | (list "libmachdevdde" "libddekit"))
|
| 336 |
|
| 337 | (define-public libacpica
|
| 338 | (let ((commit "0c3593e27947ef0734a070143caadaed28438354")
|
| 339 | (revision "0"))
|
| 340 | (package
|
| 341 | (name "libacpica")
|
| 342 | (home-page "https://salsa.debian.org/hurd-team/libacpica")
|
| 343 | (version (git-version "20220331" revision commit))
|
| 344 | (source (origin
|
| 345 | (method git-fetch)
|
| 346 | (uri (git-reference
|
| 347 | (url home-page)
|
| 348 | (commit commit)))
|
| 349 | (sha256
|
| 350 | (base32
|
| 351 | "0hyfg4w2ch6a833kkxjcsddqq2712gqlbvrl6zv5yzvallpfzh7d"))
|
| 352 | (file-name (git-file-name name version))))
|
| 353 | (arguments
|
| 354 | (list
|
| 355 | #:tests? #f |
| 356 | #:modules '((srfi srfi-26)
|
| 357 | (ice-9 rdelim)
|
| 358 | (guix build utils)
|
| 359 | (guix build gnu-build-system))
|
| 360 | #:make-flags #~`(,(string-append "CC=" #$(cc-for-target))
|
| 361 | ,(string-append "PREFIX=" #$output))
|
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | #:phases
|
| 367 | #~(modify-phases %standard-phases
|
| 368 | (delete 'configure)
|
| 369 | (add-after 'unpack 'apply-patches
|
| 370 | (lambda* (#:key target #:allow-other-keys)
|
| 371 | (let* ((patch-directory "debian/patches/")
|
| 372 | (series (string-append patch-directory "series"))
|
| 373 | (text (with-input-from-file series read-string))
|
| 374 | (lines (string-split (string-trim-right text) #\newline))
|
| 375 | (patches (filter (negate (cute string-prefix? "#" <>))
|
| 376 | lines))
|
| 377 | (patch-files (map
|
| 378 | (cute string-append patch-directory <>)
|
| 379 | patches)))
|
| 380 | (for-each
|
| 381 | (cute invoke "patch" "--force" "-p1" "-i" <>)
|
| 382 | patch-files)))))))
|
| 383 | (inputs (list libirqhelp
|
| 384 | libpciaccess))
|
| 385 | (build-system gnu-build-system)
|
| 386 | (supported-systems %hurd-systems)
|
| 387 | (synopsis "ACPICA as a library")
|
| 388 | (description "libacpica provides ACPICA as a library.")
|
| 389 | (license (list bsd-3
|
| 390 | gpl2)))))
|
| 391 |
|
| 392 | (define-public hurd
|
| 393 | (package
|
| 394 | (name "hurd")
|
| 395 | (source (origin
|
| 396 | (inherit (package-source hurd-headers))
|
| 397 | (patches (search-patches "hurd-pfinet-recv-control-block.patch"
|
| 398 | "hurd-refcounts-assert.patch"
|
| 399 | "hurd-rumpdisk-no-hd.patch"))))
|
| 400 | (version (package-version hurd-headers))
|
| 401 | (arguments
|
| 402 | `(#:tests? #f |
| 403 | #:phases
|
| 404 | (modify-phases %standard-phases
|
| 405 | (add-after 'unpack 'prepare-addons
|
| 406 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 407 | |
| 408 | (for-each make-file-writable (find-files "."))
|
| 409 | (let ((dde (assoc-ref (or native-inputs inputs) "dde-sources")))
|
| 410 | (for-each (lambda (dir)
|
| 411 | (copy-recursively
|
| 412 | (string-append dde "/" dir ) dir))
|
| 413 | '("libmachdevdde" "libddekit" "libdde_linux26")))
|
| 414 | |
| 415 | |
| 416 | (substitute* "Makefile"
|
| 417 | (("libbpf ")
|
| 418 | "libbpf libmachdevdde libddekit "))))
|
| 419 | (add-before 'build 'pre-build
|
| 420 | (lambda _
|
| 421 | |
| 422 | (substitute* '("daemons/Makefile" "utils/Makefile")
|
| 423 | (("-o root -m 4755") ""))
|
| 424 | #t))
|
| 425 | (add-after 'unpack 'create-runsystem
|
| 426 | (lambda _
|
| 427 | |
| 428 | (delete-file "daemons/runsystem.sh")
|
| 429 | (with-output-to-file "daemons/runsystem.sh"
|
| 430 | (lambda _
|
| 431 | (display "#! /bin/bash
|
| 432 |
|
| 433 | # XXX Guile needs pipe support for its finalizer thread, to start.
|
| 434 | # Remove this script when Linux and the Hurd have xattr patches.
|
| 435 | PATH=@PATH@
|
| 436 |
|
| 437 | umask 022
|
| 438 |
|
| 439 | # XXX Work around a race condition (probably in the root translator).
|
| 440 | for i in $(seq 100000); do :; done
|
| 441 |
|
| 442 | # This is necessary to make stat / return the correct device ids.
|
| 443 | # As / should be read-only at this point, this should be a no-op.
|
| 444 | fsysopts / --update --readonly
|
| 445 |
|
| 446 | if test -f /etc/fstab; then
|
| 447 | fsck --all --preen --verbose
|
| 448 | else
|
| 449 | echo \"No /etc/fstab found, ignoring...\"
|
| 450 | fi
|
| 451 |
|
| 452 | case $? in
|
| 453 | # Successful completion
|
| 454 | 0)
|
| 455 | fsysopts / --writable
|
| 456 | ;;
|
| 457 | # Filesystem modified (but ok now)
|
| 458 | 1)
|
| 459 | fsysopts / --writable
|
| 460 | ;;
|
| 461 | # Filesystem modified, filesystem should be restarted
|
| 462 | # Ideally we would only restart the filesystem
|
| 463 | 2 | 3)
|
| 464 | # Note: this /sbin gets substituted
|
| 465 | /sbin/reboot
|
| 466 | ;;
|
| 467 | # Fsck couldn't fix it.
|
| 468 | 4 | 5 | 8 | 9)
|
| 469 | echo \"Automatic boot failed... help!\"
|
| 470 | exit 1
|
| 471 | ;;
|
| 472 | # Signal that really interrupted something
|
| 473 | 20 | 130 | 131)
|
| 474 | echo \"Boot interrupted\"
|
| 475 | exit 1
|
| 476 | ;;
|
| 477 | # Special `let fsck finish' interruption (SIGQUIT)
|
| 478 | 12)
|
| 479 | echo \"Boot interrupted (filesystem checks complete)\"
|
| 480 | exit 1
|
| 481 | ;;
|
| 482 | # Oh dear.
|
| 483 | *)
|
| 484 | echo \"Unknown error during fsck (exit status $?)\"
|
| 485 | exit 1
|
| 486 | ;;
|
| 487 | esac
|
| 488 |
|
| 489 | # Create seed file to avoid
|
| 490 | # /gnu/store/...-hurd-x.y.z/hurd/random: Warning: Failed to read random seed file /var/lib/random-seed: No such file or directory
|
| 491 | mkdir -p /var/lib
|
| 492 | seq 1000 > /var/lib/random-seed
|
| 493 |
|
| 494 | # The random translators, especially /dev/urandom, need to be non-passive
|
| 495 | # When they exist in the file-system and reference /var/lib/random-seed
|
| 496 | # while / is read-only. console-run will hang.
|
| 497 | settrans --create --active /dev/random /hurd/random --seed-file /var/lib/random-seed
|
| 498 | settrans --create --active /dev/urandom /hurd/random --seed-file /var/lib/random-seed --fast
|
| 499 |
|
| 500 | # Only after this we can run guile.
|
| 501 | mkdir -p /servers/socket
|
| 502 | rm -f /servers/socket/1
|
| 503 | # Note: this /hurd gets substituted
|
| 504 | settrans --create /servers/socket/1 /hurd/pflocal
|
| 505 |
|
| 506 | # parse multiboot arguments
|
| 507 | for i in \"$@\"; do
|
| 508 | case $i in
|
| 509 | (gnu.system=*)
|
| 510 | system=${i#gnu.system=}
|
| 511 | ;;
|
| 512 | esac
|
| 513 | done
|
| 514 |
|
| 515 | echo Starting ${system}/rc...
|
| 516 | exec ${system}/rc \"$@\"
|
| 517 | ")))))
|
| 518 | (add-before 'build 'set-file-names
|
| 519 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 520 | (let* ((out (assoc-ref outputs "out"))
|
| 521 | (bash (assoc-ref inputs "bash-minimal"))
|
| 522 | (coreutils (assoc-ref inputs "coreutils"))
|
| 523 | (sed (assoc-ref inputs "sed"))
|
| 524 | (grep (assoc-ref inputs "grep"))
|
| 525 | (util-linux (assoc-ref inputs "util-linux"))
|
| 526 | (e2fsprogs (assoc-ref inputs "e2fsprogs")))
|
| 527 | (substitute* '("daemons/runttys.c" "daemons/getty.c" "utils/login.c")
|
| 528 | (("/bin/login")
|
| 529 | (string-append out "/bin/login"))
|
| 530 | (("/bin/bash") (string-append bash "/bin/bash")))
|
| 531 | (substitute* '("startup/startup.c" "config/ttys")
|
| 532 | (("/libexec/")
|
| 533 | (string-append out "/libexec/")))
|
| 534 | (substitute* '("utils/uptime.sh")
|
| 535 | (("/bin/w")
|
| 536 | (string-append out "/bin/w")))
|
| 537 | |
| 538 | |
| 539 | |
| 540 | (substitute* '("boot/boot.c"
|
| 541 | "daemons/console-run.c"
|
| 542 | "startup/startup.c"
|
| 543 | "sutils/swapon.c"
|
| 544 | "tmpfs/tmpfs.c")
|
| 545 | (("/hurd/")
|
| 546 | (string-append out "/hurd/"))
|
| 547 | (("/sbin/")
|
| 548 | (string-append out "/sbin/")))
|
| 549 | (substitute* '("libdiskfs/boot-start.c"
|
| 550 | "libdiskfs/opts-std-startup.c")
|
| 551 | (("_HURD_STARTUP")
|
| 552 | (string-append "\"" out "/hurd/startup\"")))
|
| 553 | (substitute* '("daemons/runsystem.sh"
|
| 554 | "utils/fakeroot.sh"
|
| 555 | "utils/remap.sh"
|
| 556 | "sutils/MAKEDEV.sh"
|
| 557 | "sutils/losetup.sh")
|
| 558 | (("^PATH=.*")
|
| 559 | (string-append "PATH=" out "/bin"
|
| 560 | ":" out "/sbin"
|
| 561 | ":" coreutils "/bin"
|
| 562 | ":" e2fsprogs "/sbin"
|
| 563 | ":" grep "/bin"
|
| 564 | ":" sed "/bin"
|
| 565 | ":" util-linux "/sbin\n"))
|
| 566 | (("/sbin/") (string-append out "/sbin/"))
|
| 567 | (("/libexec/") (string-append out "/libexec/"))
|
| 568 | (("/hurd/") (string-append out "/hurd/")))
|
| 569 | (substitute* "sutils/fsck.c"
|
| 570 | (("/sbin/") (in-vicinity e2fsprogs "sbin/")))
|
| 571 | (substitute* '("utils/remap.sh"
|
| 572 | "utils/fakeroot.sh")
|
| 573 | (("/bin/settrans") (string-append out "/bin/settrans"))
|
| 574 | (("/bin/fakeauth") (string-append out "/bin/fakeauth"))))))
|
| 575 | (add-after 'patch-shebangs 'patch-libexec-shebangs
|
| 576 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 577 | |
| 578 | |
| 579 | (let* ((out (assoc-ref outputs "out"))
|
| 580 | (bash (assoc-ref inputs "bash-minimal"))
|
| 581 | (path (list (string-append bash "/bin"))))
|
| 582 | (for-each (lambda (file)
|
| 583 | (patch-shebang file path))
|
| 584 | (find-files (string-append out "/libexec"))))))
|
| 585 | (add-after 'build 'build-libdde-linux
|
| 586 | (lambda* (#:key inputs native-inputs #:allow-other-keys)
|
| 587 | (let ((arch ,(match (or (%current-target-system)
|
| 588 | (%current-system))
|
| 589 | ((? target-x86-32?)
|
| 590 | "x86")
|
| 591 | ((? target-x86-64?)
|
| 592 | "amd64")
|
| 593 | (_
|
| 594 | |
| 595 | |
| 596 | "UNSUPPORTED_SYSTEM"))))
|
| 597 | (when ,(target-hurd64?)
|
| 598 | (let ((dir "libdde_linux26/build/include"))
|
| 599 | (mkdir-p (string-append dir "/x86"))
|
| 600 | (format #t "symlink ~a -> ~a\n"
|
| 601 | (string-append dir "/x86/amd64") "x86")
|
| 602 | (symlink "x86" (string-append dir "/amd64"))
|
| 603 | (format #t "symlink ~a -> ~a\n"
|
| 604 | (string-append dir "/amd64/asm-x86_64") "asm-x86")
|
| 605 | (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64"))))
|
| 606 | (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
|
| 607 | "/bin/make")
|
| 608 | |
| 609 | |
| 610 | "-j1" "-C" "libdde_linux26"
|
| 611 | (string-append "SHELL="
|
| 612 | (assoc-ref (or native-inputs inputs) "bash")
|
| 613 | "/bin/bash")
|
| 614 | (string-append "CC="
|
| 615 | ,(cc-for-target))
|
| 616 | (string-append
|
| 617 | "WARNINGS="
|
| 618 | " -Wno-error=declaration-missing-parameter-type"
|
| 619 | " -Wno-error=implicit-function-declaration"
|
| 620 | " -Wno-error=implicit-int"
|
| 621 | " -Wno-error=int-conversion"
|
| 622 | " -Wno-error=strict-prototypes")
|
| 623 | (string-append "ARCH=" arch)))))
|
| 624 | (add-after 'install 'install-goodies
|
| 625 | (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
|
| 626 | |
| 627 | |
| 628 | (let* ((out (assoc-ref outputs "out"))
|
| 629 | (datadir (string-append out "/share/hurd"))
|
| 630 | (arch ,(match (or (%current-target-system)
|
| 631 | (%current-system))
|
| 632 | ((? target-x86-32?)
|
| 633 | "x86")
|
| 634 | ((? target-x86-64?)
|
| 635 | "amd64")
|
| 636 | (_
|
| 637 | |
| 638 | |
| 639 | "UNSUPPORTED_SYSTEM")))
|
| 640 | (dir (string-append out "/share/libdde_linux26/build/include")))
|
| 641 | (mkdir-p dir)
|
| 642 | (when ,(target-hurd64?)
|
| 643 | (mkdir-p (string-append dir "/amd64"))
|
| 644 | (format #t "symlink ~a -> ~a\n"
|
| 645 | (string-append dir "/amd64/asm-x86_64")
|
| 646 | "x86")
|
| 647 | (symlink "x86" (string-append dir "/amd46")))
|
| 648 | (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
|
| 649 | "/bin/make")
|
| 650 | "-C" "libdde_linux26" "install"
|
| 651 | (string-append "SHELL="
|
| 652 | (assoc-ref (or native-inputs inputs) "bash")
|
| 653 | "/bin/bash")
|
| 654 | (string-append "INSTALLDIR=" dir)
|
| 655 | (string-append "ARCH=" arch))
|
| 656 | (when ,(target-hurd64?)
|
| 657 | (format #t "symlink ~a -> ~a\n"
|
| 658 | (string-append dir "/amd64/asm-x86_64")
|
| 659 | "asm-x86")
|
| 660 | (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64")))
|
| 661 | |
| 662 | (mkdir-p (string-append out "/etc"))
|
| 663 | (copy-file "console/motd.UTF8"
|
| 664 | (string-append out "/etc/motd"))
|
| 665 |
|
| 666 | |
| 667 | (copy-file (assoc-ref inputs "unifont")
|
| 668 | "unifont.gz")
|
| 669 | (invoke "gunzip" "unifont.gz")
|
| 670 | (mkdir-p datadir)
|
| 671 | (copy-file "unifont"
|
| 672 | (string-append datadir "/vga-system.bdf"))))))
|
| 673 | #:configure-flags
|
| 674 | ,#~(list (string-append "LDFLAGS=-Wl,-rpath="
|
| 675 | #$output "/lib"
|
| 676 | |
| 677 | " -Wl,--as-needed")
|
| 678 | "--enable-static-progs=ext2fs,iso9660fs,rumpdisk,pci-arbiter,acpi"
|
| 679 | "--disable-ncursesw"
|
| 680 | "--without-libbz2"
|
| 681 | "--without-libz")))
|
| 682 | (build-system gnu-build-system)
|
| 683 | (inputs
|
| 684 | `(("libacpica" ,libacpica) |
| 685 | ("libgcrypt" ,libgcrypt) |
| 686 | ("libdaemon" ,libdaemon) |
| 687 | ("libxcrypt" ,libxcrypt) |
| 688 | ("unifont" ,unifont)
|
| 689 | ("libpciaccess" ,libpciaccess-static)
|
| 690 |
|
| 691 | |
| 692 | ("libtirpc" ,libtirpc)
|
| 693 |
|
| 694 | |
| 695 | ("bash-minimal" ,bash-minimal)
|
| 696 | ("coreutils" ,coreutils)
|
| 697 | ("e2fsprogs" ,e2fsprogs) |
| 698 | ("sed" ,sed)
|
| 699 | ("grep" ,grep)
|
| 700 | ("util-linux" ,util-linux "static") |
| 701 | ("parted" ,parted) |
| 702 | ("rumpkernel" ,rumpkernel)))
|
| 703 | (native-inputs
|
| 704 | `(("autoconf" ,autoconf)
|
| 705 | ("automake" ,automake)
|
| 706 | ("libgcrypt" ,libgcrypt) |
| 707 | ("mig" , (if (%current-target-system)
|
| 708 | (cross-mig (%current-target-system))
|
| 709 | mig))
|
| 710 | ("pkg-config" ,pkg-config)
|
| 711 | ("perl" ,perl)
|
| 712 | ("texinfo" ,texinfo)
|
| 713 | ("dde-sources" ,dde-sources)))
|
| 714 | (supported-systems %hurd-systems)
|
| 715 | (home-page "https://www.gnu.org/software/hurd/hurd.html")
|
| 716 | (synopsis "The kernel servers for the GNU operating system")
|
| 717 | (description
|
| 718 | "The Hurd is the kernel for the GNU system, a replacement and
|
| 719 | augmentation of standard Unix kernels. It is a collection of protocols for
|
| 720 | system interaction (file systems, networks, authentication), and servers
|
| 721 | implementing them.")
|
| 722 | (license gpl2+)))
|
| 723 |
|
| 724 | (define-public netdde
|
| 725 | (let ((commit "c0ef248dc7c5ccc1273e2a796f3ece30c5b645df")
|
| 726 | (revision "3"))
|
| 727 | (package
|
| 728 | (name "netdde")
|
| 729 | |
| 730 | |
| 731 | (version (git-version "2.6.32.65" revision commit))
|
| 732 | (source (origin
|
| 733 | (method git-fetch)
|
| 734 | (uri (git-reference
|
| 735 | (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
|
| 736 | (commit commit)))
|
| 737 | (patches (search-patches "netdde-build-fix.patch"
|
| 738 | "netdde-csum.patch"))
|
| 739 | (sha256
|
| 740 | (base32
|
| 741 | "070fpmd4nvn3mp8dj9w4if63iwz7j2m0h6ywq888znw70wlrc6sh"))
|
| 742 | (file-name (git-file-name name commit))))
|
| 743 | (build-system gnu-build-system)
|
| 744 | (arguments
|
| 745 | `(#:tests? #f |
| 746 | #:make-flags
|
| 747 | (list (string-append "SHELL="
|
| 748 | (search-input-file %build-inputs "/bin/bash"))
|
| 749 | "PKGDIR=libdde_linux26"
|
| 750 | (string-append "CC=" ,(cc-for-target))
|
| 751 | (string-append "WARNINGS="
|
| 752 | " -Wno-error=declaration-missing-parameter-type"
|
| 753 | " -Wno-error=implicit-function-declaration"
|
| 754 | " -Wno-error=implicit-int"
|
| 755 | " -Wno-error=int-conversion"
|
| 756 | " -Wno-error=strict-prototypes")
|
| 757 | (let ((arch ,(match (or (%current-target-system)
|
| 758 | (%current-system))
|
| 759 | ((? target-x86-32?)
|
| 760 | "x86")
|
| 761 | ((? target-x86-64?)
|
| 762 | "amd64")
|
| 763 | (_
|
| 764 | |
| 765 | |
| 766 | "UNSUPPORTED_SYSTEM"))))
|
| 767 | (string-append "ARCH=" arch)))
|
| 768 | #:configure-flags
|
| 769 | ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
|
| 770 | #:phases
|
| 771 | (modify-phases %standard-phases
|
| 772 | (delete 'configure)
|
| 773 | (add-after 'unpack 'prepare-dde
|
| 774 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 775 | (for-each make-file-writable (find-files "."))
|
| 776 | (let ((dde (assoc-ref (or native-inputs inputs) "dde-sources")))
|
| 777 | (for-each (lambda (dir)
|
| 778 | (copy-recursively
|
| 779 | (string-append dde "/" dir ) dir))
|
| 780 | '("libdde_linux26" "libddekit")))
|
| 781 | (substitute* "libdde_linux26/mk/rel2abs.sh"
|
| 782 | (("/bin/bash") (which "bash")))))
|
| 783 | (add-after 'patch-generated-file-shebangs 'build-libdde-linux26
|
| 784 | (lambda* (#:key make-flags #:allow-other-keys)
|
| 785 | (when ,(target-hurd64?)
|
| 786 | (let ((dir "libdde_linux26/build/include"))
|
| 787 | (mkdir-p (string-append dir "/x86"))
|
| 788 | (format #t "symlink ~a -> ~a\n"
|
| 789 | (string-append dir "/x86/amd64") "x86")
|
| 790 | (symlink "x86" (string-append dir "/amd64"))
|
| 791 | (format #t "symlink ~a -> ~a\n"
|
| 792 | (string-append dir "/amd64/asm-x86_64") "asm-x86")
|
| 793 | (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64"))))
|
| 794 | (with-directory-excursion "libdde_linux26"
|
| 795 | (apply invoke "make"
|
| 796 | (delete "PKGDIR=libdde_linux26" make-flags)))))
|
| 797 | (add-after 'build-libdde-linux26 'convert
|
| 798 | (lambda* (#:key make-flags #:allow-other-keys)
|
| 799 | (apply invoke "make" "convert" make-flags)))
|
| 800 | (replace 'build
|
| 801 | (lambda* (#:key make-flags #:allow-other-keys)
|
| 802 | (apply invoke "make"
|
| 803 | ,(string-append "LINK_PROGRAM=" (cc-for-target))
|
| 804 | make-flags)
|
| 805 | |
| 806 | |
| 807 | (delete-file "Makefile.inc")
|
| 808 | (apply invoke "make"
|
| 809 | ,(string-append "LINK_PROGRAM=" (cc-for-target) " -static")
|
| 810 | "TARGET=netdde.static"
|
| 811 | make-flags)))
|
| 812 | (replace 'install
|
| 813 | (lambda* (#:key outputs #:allow-other-keys)
|
| 814 | (let ((hurd (string-append (assoc-ref outputs "out") "/hurd")))
|
| 815 | (install-file "netdde" hurd)
|
| 816 | (install-file "netdde.static" hurd)))))))
|
| 817 | (inputs
|
| 818 | (list hurd libpciaccess-static zlib `(,zlib "static")))
|
| 819 | (native-inputs
|
| 820 | `(("coreutils" ,coreutils)
|
| 821 | ("gawk" ,gawk)
|
| 822 | ("grep" ,grep)
|
| 823 | ("perl" ,perl)
|
| 824 | ("sed" ,sed)
|
| 825 | ("dde-sources" ,dde-sources)))
|
| 826 | (supported-systems %hurd-systems)
|
| 827 | (home-page "https://www.gnu.org/software/hurd/hurd.html")
|
| 828 | (synopsis "Linux network drivers glued by the DDE layer")
|
| 829 | (description
|
| 830 | "This package provides Linux 2.6 network drivers that can be embedded
|
| 831 | in userland processes thanks to the DDE layer.")
|
| 832 | |
| 833 | |
| 834 | (license gpl2))))
|
| 835 |
|
| 836 | (define-public rumpkernel
|
| 837 | (let ((commit "debian/0_20250111-6")
|
| 838 | (revision "1"))
|
| 839 | (package
|
| 840 | (name "rumpkernel")
|
| 841 | (version (git-version "0-20250111" revision (substring commit 7)))
|
| 842 | |
| 843 | |
| 844 | |
| 845 | (source (origin
|
| 846 | (method git-fetch)
|
| 847 | (uri (git-reference
|
| 848 | (url "https://salsa.debian.org/hurd-team/rumpkernel.git")
|
| 849 | (commit commit)))
|
| 850 | (sha256
|
| 851 | (base32
|
| 852 | "1pvd54k06rlgvppfbzl1d0qqcjc0kshamw1iw40s3apabh87pw1i"))
|
| 853 | (file-name (git-file-name name version))))
|
| 854 | (build-system gnu-build-system)
|
| 855 | (arguments
|
| 856 | (list
|
| 857 | #:tests? #f
|
| 858 | #:modules '((srfi srfi-26)
|
| 859 | (ice-9 rdelim)
|
| 860 | (guix build utils)
|
| 861 | (guix build gnu-build-system))
|
| 862 | |
| 863 | |
| 864 | |
| 865 | |
| 866 | |
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | #:phases
|
| 873 | #~(modify-phases %standard-phases
|
| 874 | (add-after 'unpack 'apply-patches
|
| 875 | (lambda* (#:key target #:allow-other-keys)
|
| 876 | (let* ((patch-directory "debian/patches/")
|
| 877 | (series (string-append patch-directory "series"))
|
| 878 | (text (with-input-from-file series read-string))
|
| 879 | (lines (string-split (string-trim-right text) #\newline))
|
| 880 | (patches (filter (negate (cute string-prefix? "#" <>))
|
| 881 | lines))
|
| 882 | (patch-files (map
|
| 883 | (cute string-append patch-directory <>)
|
| 884 | patches)))
|
| 885 | (for-each
|
| 886 | (cute invoke "patch" "--force" "-p1" "-i" <>)
|
| 887 | patch-files)
|
| 888 | |
| 889 | |
| 890 | (let* ((prefix (if (not target) "" (string-append target "-")))
|
| 891 | (mig (string-append prefix "mig")))
|
| 892 | (substitute* "pci-userspace/src-gnu/Makefile.inc"
|
| 893 | (("MIG=mig")
|
| 894 | (string-append "MIG=" mig)))))))
|
| 895 | (add-before 'configure 'setenv
|
| 896 | (lambda* (#:key build target #:allow-other-keys)
|
| 897 | (define (noisy-setenv name value)
|
| 898 | (setenv name value)
|
| 899 | (format (current-error-port) "set ~a=~s\n" name value))
|
| 900 | (noisy-setenv "HOST_CC" "gcc")
|
| 901 | (let* ((prefix (if (not target) "" (string-append target "-"))))
|
| 902 | (noisy-setenv "TARGET_AR" (string-append prefix "ar"))
|
| 903 | (noisy-setenv "TARGET_CC" (string-append prefix "gcc"))
|
| 904 | (noisy-setenv "TARGET_CXX" (string-append prefix "g++"))
|
| 905 | (noisy-setenv "TARGET_LD" (string-append prefix "ld"))
|
| 906 | (noisy-setenv "TARGET_MIG" (string-append prefix "mig"))
|
| 907 | (noisy-setenv "TARGET_NM" (string-append prefix "nm"))
|
| 908 | (noisy-setenv "MIG" (string-append prefix "mig")))
|
| 909 | (setenv "PAWD" "pwd")
|
| 910 | (for-each
|
| 911 | (cute noisy-setenv <> "")
|
| 912 | '("_GCC_CRTENDS"
|
| 913 | "_GCC_CRTEND"
|
| 914 | "_GCC_CRTBEGINS"
|
| 915 | "_GCC_CRTBEGIN"
|
| 916 | "_GCC_CRTI"
|
| 917 | "_GCC_CRTN"))))
|
| 918 | (replace 'configure
|
| 919 | (lambda args
|
| 920 | (let ((configure (assoc-ref %standard-phases 'configure)))
|
| 921 | (with-directory-excursion "buildrump.sh/src/lib/librumpuser"
|
| 922 | (apply configure args)))))
|
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | (replace 'build
|
| 929 | (lambda* (#:key parallel-build? #:allow-other-keys)
|
| 930 | (let* ((jobs (if parallel-build? (parallel-job-count) 1))
|
| 931 | (host-cpu #$(match (or (%current-target-system)
|
| 932 | (%current-system))
|
| 933 | ((? target-x86-32?)
|
| 934 | "i386")
|
| 935 | ((? target-x86-64?)
|
| 936 | "amd64")
|
| 937 | (_ "unknown")))
|
| 938 | (toprump (string-append
|
| 939 | (getcwd)
|
| 940 | "/buildrump.sh/src/sys/rump"))
|
| 941 | (rump-make (string-append
|
| 942 | (getcwd)
|
| 943 | "/buildrump.sh/src/obj/tooldir/bin/nbmake-"
|
| 944 | host-cpu)))
|
| 945 | (mkdir "obj")
|
| 946 | (with-directory-excursion "buildrump.sh/src"
|
| 947 | (invoke
|
| 948 | "sh" "build.sh"
|
| 949 | "-V" "TOOLS_BUILDRUMP=yes"
|
| 950 | "-V" "MKBINUTILS=no"
|
| 951 | "-V" "MKGDB=no"
|
| 952 | "-V" "MKGROFF=no"
|
| 953 | "-V" "MKDTRACE=no"
|
| 954 | "-V" "MKZFS=no"
|
| 955 |
|
| 956 | "-V" (string-append "TOPRUMP=" toprump)
|
| 957 | "-V" "BUILDRUMP_CPPFLAGS=-Wno-error=stringop-overread"
|
| 958 | "-V" "RUMPUSER_EXTERNAL_DPLIBS=pthread"
|
| 959 | |
| 960 | "-V" (string-append "C_INCLUDE_PATH=" (getenv "C_INCLUDE_PATH"))
|
| 961 | "-V" (string-append
|
| 962 | "CPPFLAGS="
|
| 963 | " -I../../obj/destdir." host-cpu "/usr/include"
|
| 964 | " -D_FILE_OFFSET_BITS=64"
|
| 965 | " -DRUMP_REGISTER_T=int"
|
| 966 | " -DRUMPUSER_CONFIG=yes"
|
| 967 | " -DNO_PCI_MSI_MSIX=yes"
|
| 968 | " -DNUSB_DMA=1"
|
| 969 | " -DPAE"
|
| 970 | " -DBUFPAGES=16")
|
| 971 | "-V" (string-append
|
| 972 | "CWARNFLAGS="
|
| 973 | " -Wno-error=maybe-uninitialized"
|
| 974 | " -Wno-error=address-of-packed-member"
|
| 975 | " -Wno-error=unused-variable"
|
| 976 | " -Wno-error=stack-protector"
|
| 977 | " -Wno-error=array-parameter"
|
| 978 | " -Wno-error=array-bounds"
|
| 979 | " -Wno-error=stringop-overflow"
|
| 980 | " -Wno-error=sign-compare")
|
| 981 | "-V" "LIBCRTBEGIN="
|
| 982 | "-V" "LIBCRTEND="
|
| 983 | "-V" "LIBCRT0="
|
| 984 | "-V" "LIBCRTI="
|
| 985 | "-V" "_GCC_CRTENDS="
|
| 986 | "-V" "_GCC_CRTEND="
|
| 987 | "-V" "_GCC_CRTBEGINS="
|
| 988 | "-V" "_GCC_CRTBEGIN="
|
| 989 | "-V" "_GCC_CRTI="
|
| 990 | "-V" "_GCC_CRTN="
|
| 991 | "-U"
|
| 992 | "-u"
|
| 993 | "-T" "./obj/tooldir"
|
| 994 | "-m" host-cpu
|
| 995 | "-j" (number->string jobs)
|
| 996 | "tools"
|
| 997 | "rump"))
|
| 998 | (with-directory-excursion "buildrump.sh/src/lib/librumpuser"
|
| 999 | (setenv "RUMPRUN" "true")
|
| 1000 | (invoke rump-make "dependall"))
|
| 1001 | (with-directory-excursion "pci-userspace/src-gnu"
|
| 1002 | (invoke rump-make "dependall")))))
|
| 1003 | (replace 'install
|
| 1004 | (lambda _
|
| 1005 | (define (install-file file target)
|
| 1006 | (let ((dest (string-append target (basename file))))
|
| 1007 | (format (current-output-port) "`~a' -> `~a'~%" file dest)
|
| 1008 | (mkdir-p (dirname dest))
|
| 1009 | |
| 1010 | |
| 1011 | |
| 1012 | (if (file-exists? dest)
|
| 1013 | (format (current-error-port)
|
| 1014 | "warning: skipping: ~a\n" file)
|
| 1015 | (let ((stat (lstat file)))
|
| 1016 | (case (stat:type stat)
|
| 1017 | ((symlink)
|
| 1018 | (let ((target (readlink file)))
|
| 1019 | (symlink target dest)))
|
| 1020 | (else
|
| 1021 | (copy-file file dest)))))))
|
| 1022 | (let ((header (string-append #$output "/include/rump"))
|
| 1023 | (lib (string-append #$output "/lib/")))
|
| 1024 | (mkdir-p header)
|
| 1025 | (copy-recursively "buildrump.sh/src/sys/rump/include/rump"
|
| 1026 | header)
|
| 1027 | (mkdir-p lib)
|
| 1028 | (for-each
|
| 1029 | (cute install-file <> lib)
|
| 1030 | (append (find-files "buildrump.sh/src" "librump.*[.](a|so.*)")
|
| 1031 | (find-files "obj" "librump.*[.](a|so.*)")))))))))
|
| 1032 | (inputs
|
| 1033 | (list gnumach-headers libpciaccess libirqhelp))
|
| 1034 | (native-inputs
|
| 1035 | (list autoconf
|
| 1036 | automake
|
| 1037 | libgcrypt
|
| 1038 | (if (%current-target-system)
|
| 1039 | (cross-mig (%current-target-system))
|
| 1040 | mig)
|
| 1041 | zlib))
|
| 1042 | (supported-systems %hurd-systems)
|
| 1043 | (home-page "https://wiki.netbsd.org/rumpkernel")
|
| 1044 | (synopsis "NetBSD as rumpkernel for the GNU/Hurd")
|
| 1045 | (description
|
| 1046 | "This package provides NetBSD as rumpkernel for the GNU/Hurd, so that
|
| 1047 | the Hurd may be installed on iron. Using this rumpkernel package, the hurd
|
| 1048 | package's rumpdisk can be built which provides the pci.arbiter and rumpdisk
|
| 1049 | servers.")
|
| 1050 | (license
|
| 1051 | |
| 1052 | |
| 1053 | |
| 1054 | (list asl2.0
|
| 1055 | boost1.0
|
| 1056 | bsd-2
|
| 1057 | bsd-3
|
| 1058 | bsd-4
|
| 1059 | cddl1.0
|
| 1060 | expat
|
| 1061 | gpl1
|
| 1062 | gpl2+
|
| 1063 | gpl3+
|
| 1064 | isc
|
| 1065 | lgpl2.0+
|
| 1066 | public-domain
|
| 1067 | (@ (guix licenses) zlib)
|
| 1068 | (non-copyleft "file://src/lib/libc/hash/hashhl.c"
|
| 1069 | "See debian/copyright in the distribution."))))))
|