Merge pull request #119922 from Ericson2314/netbsd-bootstrap

netbsd: Make boostrapping more orthodox and don't rely on splicing

authored by

John Ericson and committed by
GitHub
6f183980 892d3fd7

+142 -95
-5
pkgs/os-specific/bsd/default.nix
··· 1 - { callPackages, recurseIntoAttrs }: 2 - 3 - { 4 - netbsd = recurseIntoAttrs (callPackages ./netbsd {}); 5 - }
+138 -86
pkgs/os-specific/bsd/netbsd/default.nix
··· 1 1 { stdenv, lib, stdenvNoCC 2 - , buildPackages, splicePackages 2 + , pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget, pkgsHostHost, pkgsTargetTarget 3 + , buildPackages, splicePackages, newScope 3 4 , bsdSetupHook, makeSetupHook, fetchcvs, groff, mandoc, byacc, flex 4 5 , zlib 5 6 , writeText, symlinkJoin ··· 13 14 tag = "netbsd-${lib.replaceStrings ["."] ["-"] version}-RELEASE"; 14 15 }; 15 16 16 - # Splice packages so we get the correct package when using 17 - # nativeBuildInputs... 18 - nbSplicedPackages = splicePackages { 19 - pkgsBuildBuild = buildPackages.buildPackages.netbsd; 20 - pkgsBuildHost = buildPackages.netbsd; 21 - pkgsBuildTarget = {}; 22 - pkgsHostHost = {}; 23 - pkgsHostTarget = netbsd; 24 - pkgsTargetTarget = {}; 17 + otherSplices = { 18 + selfBuildBuild = pkgsBuildBuild.netbsd; 19 + selfBuildHost = pkgsBuildHost.netbsd; 20 + selfBuildTarget = pkgsBuildTarget.netbsd; 21 + selfHostHost = pkgsHostHost.netbsd; 22 + selfTargetTarget = pkgsTargetTarget.netbsd or {}; # might be missing 25 23 }; 26 24 27 - netbsd = with nbSplicedPackages; { 25 + in lib.makeScopeWithSplicing 26 + splicePackages 27 + newScope 28 + otherSplices 29 + {} 30 + (self: let 31 + inherit (self) mkDerivation; 32 + in { 33 + 34 + # Why do we have splicing and yet do `nativeBuildInputs = with self; ...`? 35 + # 36 + # We use `lib.makeScopeWithSplicing` because this should be used for all 37 + # nested package sets which support cross, so the inner `callPackage` works 38 + # correctly. But for the inline packages we don't bother to use 39 + # `callPackage`. 40 + # 41 + # We still could have tried to `with` a big spliced packages set, but 42 + # splicing is jank and causes a number of bootstrapping infinite recursions 43 + # if one is not careful. Pulling deps out of the right package set directly 44 + # side-steps splicing entirely and avoids those footguns. 45 + # 46 + # For non-bootstrap-critical packages, we might as well use `callPackage` for 47 + # consistency with everything else, and maybe put in separate files too. 48 + 49 + compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isNetBSD) self.compat; 28 50 29 51 mkDerivation = lib.makeOverridable (attrs: let 30 52 stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv; ··· 34 56 35 57 extraPaths = [ ]; 36 58 37 - nativeBuildInputs = [ 59 + nativeBuildInputs = with buildPackages.netbsd; [ 38 60 bsdSetupHook 39 - makeMinimal install tsort lorder mandoc groff statHook 61 + makeMinimal 62 + install tsort lorder mandoc groff statHook 40 63 ]; 41 - buildInputs = [ compat ]; 42 - # depsBuildBuild = [ buildPackages.stdenv.cc ]; 64 + buildInputs = with self; compatIfNeeded; 43 65 44 66 OBJCOPY = if stdenv.isDarwin then "true" else "objcopy"; 45 67 HOST_SH = "${buildPackages.bash}/bin/sh"; ··· 65 87 66 88 BSD_PATH = attrs.path; 67 89 90 + strictDeps = true; 91 + 68 92 meta = with lib; { 69 93 maintainers = with maintainers; [ matthewbauer qyliss ]; 70 94 platforms = platforms.unix; ··· 89 113 sha256 = "1xbzfd4i7allrkk1if74a8ymgpizyj0gkvdigzzj37qar7la7nc1"; 90 114 version = "8.0"; 91 115 92 - buildInputs = []; 93 - nativeBuildInputs = [ bsdSetupHook ]; 116 + buildInputs = with self; []; 117 + nativeBuildInputs = with buildPackages.netbsd; [ bsdSetupHook ]; 94 118 95 119 skipIncludesPhase = true; 96 120 97 121 postPatch = '' 98 122 patchShebangs configure 99 - ${make.postPatch} 123 + ${self.make.postPatch} 100 124 ''; 101 125 buildPhase = '' 102 126 runHook preBuild ··· 115 139 116 140 runHook postInstall 117 141 ''; 118 - extraPaths = [ make.src ] ++ make.extraPaths; 142 + extraPaths = with self; [ make.src ] ++ make.extraPaths; 119 143 }; 120 144 121 - compat = if stdenv.hostPlatform.isNetBSD then stdenv else mkDerivation rec { 145 + compat = mkDerivation (let 146 + version = "8.0"; 147 + commonDeps = [ zlib ]; 148 + in { 122 149 path = "tools/compat"; 123 150 sha256 = "050449lq5gpxqsripdqip5ks49g5ypjga188nd3ss8dg1zf7ydz3"; 124 - version = "8.0"; 151 + inherit version; 125 152 126 153 setupHooks = [ 127 154 ../../../build-support/setup-hooks/role.bash 128 155 ./compat-setup-hook.sh 129 156 ]; 130 157 131 - # override defaults to prevent infinite recursion 132 - nativeBuildInputs = [ 158 + # the build system re-runs `./configure` with `HOST_CC` (which is their 159 + # name for Build CC) as a compiler to make `defs.mk`, which is installed 160 + depsBuildBuild = [ buildPackages.stdenv.cc ] ++ commonDeps; 161 + HOST_CC = "${buildPackages.stdenv.cc.targetPrefix}cc"; 162 + 163 + nativeBuildInputs = with buildPackages.netbsd; commonDeps ++ [ 133 164 bsdSetupHook 134 165 makeMinimal 135 166 ]; 136 - buildInputs = [ zlib ]; 137 167 138 - # the build system re-runs `./configure` with `HOST_CC` (which is their 139 - # name for Build CC) as a compiler to make `defs.mk`, which is installed 140 - depsBuildBuild = [ buildPackages.stdenv.cc ] ++ buildInputs; 141 - HOST_CC = "${buildPackages.stdenv.cc.targetPrefix}cc"; 168 + buildInputs = with self; commonDeps; 142 169 143 170 # temporarily use gnuinstall for bootstrapping 144 171 # bsdinstall will be built later ··· 183 210 --subst-var-by out $out \ 184 211 --subst-var-by version ${version} 185 212 ''; 186 - extraPaths = [ libc.src libutil.src 213 + extraPaths = with self; [ libc.src libutil.src 187 214 (fetchNetBSD "include" "8.0" "128m77k16i7frvk8kifhmxzk7a37m7z1s0bbmja3ywga6sx6v6sq") 188 215 (fetchNetBSD "external/bsd/flex" "8.0" "0yxcjshz9nj827qhmjwwjmzvmmqgaf0d25b42k7lj84vliwrgyr6") 189 216 (fetchNetBSD "sys/sys" "8.0" "0b0yjjy0c0cvk5nyffppqwxlwh2s1qr2xzl97a9ldck00dibar94") 190 217 ] ++ libutil.extraPaths ++ libc.extraPaths; 191 - }; 218 + }); 192 219 193 220 # HACK: to ensure parent directories exist. This emulates GNU 194 221 # install’s -D option. No alternative seems to exist in BSD install. ··· 201 228 path = "usr.bin/xinstall"; 202 229 version = "8.0"; 203 230 sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj"; 204 - extraPaths = [ mtree.src make.src ]; 205 - nativeBuildInputs = [ 231 + extraPaths = with self; [ mtree.src make.src ]; 232 + nativeBuildInputs = with buildPackages.netbsd; [ 206 233 bsdSetupHook 207 234 makeMinimal 208 235 mandoc groff 209 236 ]; 210 237 skipIncludesPhase = true; 211 - buildInputs = [ compat fts ]; 238 + buildInputs = with self; compatIfNeeded ++ [ fts ]; 212 239 installPhase = '' 213 240 runHook preInstall 214 241 ··· 226 253 path = "include/fts.h"; 227 254 sha256 = "01d4fpxvz1pgzfk5xznz5dcm0x0gdzwcsfm1h3d0xc9kc6hj2q77"; 228 255 version = "8.0"; 229 - nativeBuildInputs = [ 256 + nativeBuildInputs = with buildPackages.netbsd; [ 230 257 bsdSetupHook 231 258 ]; 232 - propagatedBuildInputs = [ compat ]; 233 - extraPaths = [ 259 + propagatedBuildInputs = with self; compatIfNeeded; 260 + extraPaths = with self; [ 234 261 (fetchNetBSD "lib/libc/gen/fts.c" "8.0" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7") 235 262 (fetchNetBSD "lib/libc/include/namespace.h" "8.0" "1sjvh9nw3prnk4rmdwrfsxh6gdb9lmilkn46jcfh3q5c8glqzrd7") 236 263 (fetchNetBSD "lib/libc/gen/fts.3" "8.0" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1") ··· 262 289 path = "usr.bin/stat"; 263 290 version = "8.0"; 264 291 sha256 = "0z4r96id2r4cfy443rw2s1n52n186xm0lqvs8s3qjf4314z7r7yh"; 265 - nativeBuildInputs = [ 292 + nativeBuildInputs = with buildPackages.netbsd; [ 266 293 bsdSetupHook 267 294 makeMinimal 268 295 install mandoc groff ··· 277 304 statHook = makeSetupHook { 278 305 name = "netbsd-stat-hook"; 279 306 } (writeText "netbsd-stat-hook-impl" '' 280 - makeFlagsArray+=(TOOL_STAT=${netbsd.stat}/bin/stat) 307 + makeFlagsArray+=(TOOL_STAT=${self.stat}/bin/stat) 281 308 ''); 282 309 283 310 tsort = mkDerivation { 284 311 path = "usr.bin/tsort"; 285 312 version = "8.0"; 286 313 sha256 = "1dqvf9gin29nnq3c4byxc7lfd062pg7m84843zdy6n0z63hnnwiq"; 287 - nativeBuildInputs = [ 314 + nativeBuildInputs = with buildPackages.netbsd; [ 288 315 bsdSetupHook 289 316 makeMinimal 290 317 install mandoc groff ··· 295 322 path = "usr.bin/lorder"; 296 323 version = "8.0"; 297 324 sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2"; 298 - nativeBuildInputs = [ 325 + nativeBuildInputs = with buildPackages.netbsd; [ 299 326 bsdSetupHook 300 327 makeMinimal 301 328 install mandoc groff ··· 337 364 path = "usr.sbin/mtree"; 338 365 version = "8.0"; 339 366 sha256 = "0hanmzm8bgwz2bhsinmsgfmgy6nbdhprwmgwbyjm6bl17vgn7vid"; 340 - extraPaths = [ mknod.src ]; 367 + extraPaths = with self; [ mknod.src ]; 341 368 }; 342 369 343 370 mknod = mkDerivation { ··· 396 423 version = "8.0"; 397 424 sha256 = "092y7db7k4kh2jq8qc55126r5qqvlb8lq8mhmy5ipbi36hwb4zrz"; 398 425 HOSTPROG = "tic"; 399 - buildInputs = [ compat ]; 400 - nativeBuildInputs = [ 426 + buildInputs = with self; compatIfNeeded; 427 + nativeBuildInputs = with buildPackages.netbsd; [ 401 428 bsdSetupHook 402 429 makeMinimal 403 430 install mandoc groff nbperf 404 431 ]; 405 432 makeFlags = [ "TOOLDIR=$(out)" ]; 406 - extraPaths = [ 433 + extraPaths = with self; [ 407 434 libterminfo.src 408 435 (fetchNetBSD "usr.bin/tic" "8.0" "0diirnzmdnpc5bixyb34c9rid9paw2a4zfczqrpqrfvjsf1nnljf") 409 436 (fetchNetBSD "tools/Makefile.host" "8.0" "1p23dsc4qrv93vc6gzid9w2479jwswry9qfn88505s0pdd7h6nvp") ··· 429 456 version = "8.0"; 430 457 sha256 = "0piyn8lgdqxwz9wkgc2plzp2xpj93fs4xncri8l0jfas9rv5j2m5"; 431 458 NIX_CFLAGS_COMPILE = [ "-DMAKE_BOOTSTRAP" ]; 432 - nativeBuildInputs = [ 459 + nativeBuildInputs = with buildPackages.netbsd; [ 433 460 bsdSetupHook 434 461 makeMinimal install mandoc byacc flex 435 462 ]; 436 - buildInputs = [ compat ]; 437 - extraPaths = [ cksum.src ]; 463 + buildInputs = with self; compatIfNeeded; 464 + extraPaths = with self; [ cksum.src ]; 438 465 }; 439 466 ## 440 467 ## END COMMAND LINE TOOLS ··· 447 474 path = "include"; 448 475 version = "8.0"; 449 476 sha256 = "128m77k16i7frvk8kifhmxzk7a37m7z1s0bbmja3ywga6sx6v6sq"; 450 - nativeBuildInputs = [ 477 + nativeBuildInputs = with buildPackages.netbsd; [ 451 478 bsdSetupHook 452 479 makeMinimal 453 480 install mandoc groff nbperf rpcgen 454 481 ]; 455 - extraPaths = [ common.src ]; 482 + extraPaths = with self; [ common.src ]; 456 483 headersOnly = true; 457 484 noCC = true; 458 - # meta.platforms = lib.platforms.netbsd; 459 - makeFlags = [ "RPCGEN_CPP=${buildPackages.gcc-unwrapped}/bin/cpp" ]; 485 + meta.platforms = lib.platforms.netbsd; 486 + makeFlags = [ "RPCGEN_CPP=${buildPackages.stdenv.cc.cc}/bin/cpp" ]; 460 487 }; 461 488 462 489 common = mkDerivation { 463 490 path = "common"; 464 491 version = "8.0"; 465 492 sha256 = "1fsm2b7p7zkhiz523jw75088cq2h39iknp0fp3di9a64bikwbhi1"; 493 + noCC = true; 466 494 }; 467 495 468 - # The full kernel 469 - sys = mkDerivation { 496 + sys-headers = mkDerivation { 497 + pname = "sys-headers"; 470 498 path = "sys"; 471 499 version = "8.0"; 472 500 sha256 = "123ilg8fqmp69bw6bs6nh98fpi1v2n9lamrzar61p27ji6sj7g0w"; 473 501 474 502 CONFIG = "GENERIC"; 475 503 476 - propagatedBuildInputs = [ include ]; 477 - nativeBuildInputs = [ 504 + propagatedBuildInputs = with self; [ include ]; 505 + nativeBuildInputs = with buildPackages.netbsd; [ 478 506 bsdSetupHook 479 507 makeMinimal install tsort lorder statHook uudecode config genassym 480 508 ]; ··· 499 527 ''; 500 528 501 529 meta.platforms = lib.platforms.netbsd; 502 - extraPaths = [ common.src ]; 530 + extraPaths = with self; [ common.src ]; 531 + 532 + installPhase = "includesPhase"; 533 + dontBuild = true; 534 + noCC = true; 535 + }; 536 + 537 + # The full kernel. We do the funny thing of overridding the headers to the 538 + # full kernal and not vice versa to avoid infinite recursion -- the headers 539 + # come earlier in the bootstrap. 540 + sys = self.sys-headers.override { 541 + pname = "sys"; 542 + installPhase = null; 543 + noCC = false; 544 + dontBuild = false; 503 545 }; 504 546 505 547 headers = symlinkJoin { 506 548 name = "netbsd-headers-8.0"; 507 - paths = [ include ] ++ map (pkg: pkg.override (_: { 508 - installPhase = "includesPhase"; 509 - dontBuild = true; 510 - noCC = true; 511 - meta.platforms = lib.platforms.all; 512 - })) [ sys libpthread ]; 549 + paths = with self; [ 550 + include 551 + sys-headers 552 + libpthread-headers 553 + ]; 554 + meta.platforms = lib.platforms.netbsd; 513 555 }; 514 556 ## 515 557 ## END HEADERS ··· 522 564 path = "lib/libutil"; 523 565 version = "8.0"; 524 566 sha256 = "077syyxd303m4x7avs5nxzk4c9n13d5lyk5aicsacqjvx79qrk3i"; 525 - extraPaths = [ common.src ]; 567 + extraPaths = with self; [ common.src ]; 526 568 }; 527 569 528 570 libedit = mkDerivation { 529 571 path = "lib/libedit"; 530 572 version = "8.0"; 531 573 sha256 = "0pmqh2mkfp70bwchiwyrkdyq9jcihx12g1awd6alqi9bpr3f9xmd"; 532 - buildInputs = [ libterminfo libcurses ]; 533 - propagatedBuildInputs = [ compat ]; 574 + buildInputs = with self; [ libterminfo libcurses ]; 575 + propagatedBuildInputs = with self; compatIfNeeded; 534 576 postPatch = '' 535 577 sed -i '1i #undef bool_t' el.h 536 578 substituteInPlace config.h \ ··· 548 590 path = "lib/libterminfo"; 549 591 version = "8.0"; 550 592 sha256 = "14gp0d6fh6zjnbac2yjhyq5m6rca7gm6q1s9gilhzpdgl9m7vb9r"; 551 - nativeBuildInputs = [ 593 + nativeBuildInputs = with buildPackages.netbsd; [ 552 594 makeMinimal install tsort lorder mandoc statHook nbperf tic 553 595 ]; 554 - buildInputs = [ compat ]; 596 + buildInputs = with self; compatIfNeeded; 555 597 SHLIBINSTALLDIR = "$(out)/lib"; 556 598 postPatch = '' 557 599 substituteInPlace term.c --replace /usr/share $out/share ··· 564 606 postInstall = '' 565 607 make -C $BSDSRCDIR/share/terminfo BINDIR=$out/share install 566 608 ''; 567 - extraPaths = [ 609 + extraPaths = with self; [ 568 610 (fetchNetBSD "share/terminfo" "8.0" "18db0fk1dw691vk6lsm6dksm4cf08g8kdm0gc4052ysdagg2m6sm") 569 611 ]; 570 612 }; ··· 573 615 path = "lib/libcurses"; 574 616 version = "8.0"; 575 617 sha256 = "0azhzh1910v24dqx45zmh4z4dl63fgsykajrbikx5xfvvmkcq7xs"; 576 - buildInputs = [ libterminfo ]; 618 + buildInputs = with self; [ libterminfo ]; 577 619 NIX_CFLAGS_COMPILE = [ 578 620 "-D__scanflike(a,b)=" 579 621 "-D__va_list=va_list" 580 622 "-D__warn_references(a,b)=" 581 623 ] ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)="; 582 - propagatedBuildInputs = [ compat ]; 624 + propagatedBuildInputs = with self; compatIfNeeded; 583 625 MKDOC = "no"; # missing vfontedpr 584 626 postPatch = lib.optionalString (!stdenv.isDarwin) '' 585 627 substituteInPlace printw.c \ ··· 632 674 meta.platforms = lib.platforms.netbsd; 633 675 }; 634 676 635 - libpthread = mkDerivation { 677 + libpthread-headers = mkDerivation { 678 + pname = "libpthread-headers"; 636 679 path = "lib/libpthread"; 637 680 version = "8.0"; 638 681 sha256 = "0pcz61klc3ijf5z2zf8s78nj7bwjfblzjllx7vr4z5qv3m0sdb3j"; 682 + installPhase = "includesPhase"; 683 + dontBuild = true; 684 + noCC = true; 639 685 meta.platforms = lib.platforms.netbsd; 640 686 }; 641 687 688 + libpthread = self.libpthread-headers.override { 689 + pname = "libpthread"; 690 + installPhase = null; 691 + noCC = false; 692 + dontBuild = false; 693 + }; 694 + 642 695 libresolv = mkDerivation { 643 696 path = "lib/libresolv"; 644 697 version = "8.0"; 645 698 sha256 = "11vpb3p2343wyrhw4v9gwz7i0lcpb9ysmfs9gsx56b5gkgipdy4v"; 646 699 meta.platforms = lib.platforms.netbsd; 647 - extraPaths = [ libc.src ]; 700 + extraPaths = with self; [ libc.src ]; 648 701 }; 649 702 650 703 libm = mkDerivation { ··· 659 712 version = "8.0"; 660 713 sha256 = "0w6y5v3binm7gf2kn7y9jja8k18rhnyl55cvvfnfipjqdxvxd9jd"; 661 714 meta.platforms = lib.platforms.netbsd; 662 - extraPaths = [ libc.src ]; 715 + extraPaths = with self; [ libc.src ]; 663 716 }; 664 717 665 718 csu = mkDerivation { ··· 667 720 version = "8.0"; 668 721 sha256 = "0630lbvz6v4ic13bfg8ccwfhqkgcv76bfdw9f36rfsnwfgpxqsmq"; 669 722 meta.platforms = lib.platforms.netbsd; 670 - nativeBuildInputs = [ 723 + nativeBuildInputs = with buildPackages.netbsd; [ 671 724 bsdSetupHook 672 725 makeMinimal 673 726 install mandoc groff flex 674 727 byacc genassym gencat lorder tsort statHook 675 728 ]; 676 - extraPaths = [ sys.src ld_elf_so.src ]; 729 + buildInputs = with self; [ headers ]; 730 + extraPaths = with self; [ sys.src ld_elf_so.src ]; 677 731 }; 678 732 679 733 ld_elf_so = mkDerivation { ··· 686 740 SHLINKINSTALLDIR = "/usr/libexec"; 687 741 USE_FORT = "yes"; 688 742 makeFlags = [ "CLIBOBJ=${stdenv.cc.libc}/lib" ]; 689 - extraPaths = [ libc.src ] ++ libc.extraPaths; 743 + extraPaths = with self; [ libc.src ] ++ libc.extraPaths; 690 744 }; 691 745 692 746 libc = mkDerivation { ··· 695 749 sha256 = "0lgbc58qgn8kwm3l011x1ml1kgcf7jsgq7hbf0hxhlbvxq5bljl3"; 696 750 USE_FORT = "yes"; 697 751 MKPROFILE = "no"; 698 - extraPaths = [ 752 + extraPaths = with self; [ 699 753 common.src i18n_module.src sys.src 700 754 ld_elf_so.src libpthread.src libm.src libresolv.src 701 755 librpcsvc.src libutil.src librt.src libcrypt.src 702 756 ]; 703 - nativeBuildInputs = [ 757 + nativeBuildInputs = with buildPackages.netbsd; [ 704 758 bsdSetupHook 705 759 makeMinimal 706 760 install mandoc groff flex 707 761 byacc genassym gencat lorder tsort statHook rpcgen 708 762 ]; 709 - buildInputs = [ buildPackages.netbsd.headers csu ]; 710 - NIX_CFLAGS_COMPILE = "-B${csu}/lib"; 763 + buildInputs = with self; [ headers csu ]; 764 + NIX_CFLAGS_COMPILE = "-B${self.csu}/lib"; 711 765 meta.platforms = lib.platforms.netbsd; 712 766 SHLIBINSTALLDIR = "$(out)/lib"; 713 767 NLSDIR = "$(out)/share/nls"; 714 768 makeFlags = [ "FILESDIR=$(out)/var/db"]; 715 769 postInstall = '' 716 - pushd ${buildPackages.netbsd.headers} 770 + pushd ${self.headers} 717 771 find . -type d -exec mkdir -p $out/\{} \; 718 772 find . \( -type f -o -type l \) -exec cp -pr \{} $out/\{} \; 719 773 popd 720 774 721 - pushd ${csu} 775 + pushd ${self.csu} 722 776 find . -type d -exec mkdir -p $out/\{} \; 723 777 find . \( -type f -o -type l \) -exec cp -pr \{} $out/\{} \; 724 778 popd ··· 752 806 make -C $BSDSRCDIR/lib/libcrypt $makeFlags install 753 807 ''; 754 808 postPatch = '' 755 - sed -i 's,/usr\(/include/sys/syscall.h\),${buildPackages.netbsd.headers}\1,g' \ 809 + sed -i 's,/usr\(/include/sys/syscall.h\),${self.headers}\1,g' \ 756 810 sys/Makefile.inc ../librt/sys/Makefile.inc 757 811 ''; 758 812 }; ··· 790 844 # END MISCELLANEOUS 791 845 # 792 846 793 - }; 794 - 795 - in netbsd 847 + })
+4 -4
pkgs/top-level/all-packages.nix
··· 10316 10316 libcCross1 = 10317 10317 if stdenv.targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers 10318 10318 else if stdenv.targetPlatform.libc == "libSystem" then darwin.xcode 10319 - else if stdenv.targetPlatform.libc == "nblibc" then netbsd.headers 10319 + else if stdenv.targetPlatform.libc == "nblibc" then targetPackages.netbsdCross.headers 10320 10320 else null; 10321 10321 binutils1 = wrapBintoolsWith { 10322 10322 bintools = binutils-unwrapped; ··· 14553 14553 else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64 14554 14554 else if stdenv.targetPlatform.useiOSPrebuilt then targetPackages.darwin.iosSdkPkgs.libraries or darwin.iosSdkPkgs.libraries 14555 14555 else if name == "libSystem" then targetPackages.darwin.xcode 14556 - else if name == "nblibc" then targetPackages.netbsdCross.libc 14556 + else if name == "nblibc" then targetPackages.netbsdCross.libc or netbsdCross.libc 14557 14557 else if name == "wasilibc" then targetPackages.wasilibc or wasilibc 14558 14558 else if name == "relibc" then targetPackages.relibc or relibc 14559 14559 else if stdenv.targetPlatform.isGhcjs then null ··· 30977 30977 name = "bsd-setup-hook"; 30978 30978 } ../os-specific/bsd/setup-hook.sh; 30979 30979 30980 - netbsd = callPackages ../os-specific/bsd/netbsd {}; 30981 - netbsdCross = callPackages ../os-specific/bsd/netbsd { 30980 + netbsd = callPackage ../os-specific/bsd/netbsd {}; 30981 + netbsdCross = callPackage ../os-specific/bsd/netbsd { 30982 30982 stdenv = crossLibcStdenv; 30983 30983 }; 30984 30984