Skip to content

MacOS nix build fails #830

Description

@arunoruto

Is this a reproducible bug?

  • I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.

Current behavior

I tried using herdr on my MacOS system via nix, but I kept getting the same build error as on hydra: https://hydra.nixos.org/build/332986051/nixlog/1

Caused by:
  process didn't exit successfully: `/nix/var/nix/builds/nix-23824-685423193/source/target/release/build/herdr-5b5e657ee3b3060e/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=vendor/libghostty-vt.vendor.json
  cargo:rerun-if-changed=vendor/libghostty-vt/build.zig
  cargo:rerun-if-changed=vendor/libghostty-vt/build.zig.zon
  cargo:rerun-if-changed=vendor/libghostty-vt/include
  cargo:rerun-if-changed=vendor/libghostty-vt/pkg
  cargo:rerun-if-changed=vendor/libghostty-vt/src
  cargo:rerun-if-changed=vendor/libghostty-vt/VERSION
  cargo:rerun-if-env-changed=LIBGHOSTTY_VT_OPTIMIZE
  cargo:rerun-if-env-changed=LIBGHOSTTY_VT_SIMD
  cargo:rerun-if-env-changed=LIBGHOSTTY_VT_ZIG_SYSTEM_DIR
  cargo:rerun-if-env-changed=HERDR_BUILD_CHANNEL
  cargo:rerun-if-env-changed=HERDR_BUILD_ID
  cargo:rerun-if-env-changed=HERDR_BUILD_COMMIT
  cargo:rerun-if-env-changed=ZIG

  --- stderr
  error: DarwinSdkNotFound
  /nix/store/rw37ij7sv3h2iic0vlk0y4078zdryjcb-zig-0.15.2/lib/zig/std/zig/LibCInstallation.zig:172:13: 0x1045a7fdf in findNative (build)
              return error.DarwinSdkNotFound;
              ^
  /nix/var/nix/builds/nix-23824-685423193/source/vendor/libghostty-vt/src/build/SharedDeps.zig:146:26: 0x1045af757 in add (build)
              const libc = try std.zig.LibCInstallation.findNative(.{
                           ^
  /nix/var/nix/builds/nix-23824-685423193/source/vendor/libghostty-vt/src/build/GhosttyBench.zig:29:13: 0x1045de3f7 in init (build)
          _ = try deps.add(exe);
              ^
  /nix/var/nix/builds/nix-23824-685423193/source/vendor/libghostty-vt/build.zig:103:19: 0x1045e9127 in build (build)
      const bench = try buildpkg.GhosttyBench.init(b, &deps);
                    ^
  /nix/store/rw37ij7sv3h2iic0vlk0y4078zdryjcb-zig-0.15.2/lib/zig/std/Build.zig:2215:25: 0x10456eb1b in runBuild__anon_21417 (build)
          .error_union => try build_zig.build(b),
                          ^
  /nix/store/rw37ij7sv3h2iic0vlk0y4078zdryjcb-zig-0.15.2/lib/zig/compiler/build_runner.zig:366:9: 0x104566e2b in main (build)
          try builder.runBuild(root);
          ^
  error: the following build command failed with exit code 1:
  .zig-cache/o/0684480331b10ce197a7bcd9401783fb/build /nix/store/rw37ij7sv3h2iic0vlk0y4078zdryjcb-zig-0.15.2/bin/zig /nix/store/rw37ij7sv3h2iic0vlk0y4078zdryjcb-zig-0.15.2/lib/zig /nix/var/nix/builds/nix-23824-685423193/source/vendor/libghostty-vt .zig-cache /nix/var/nix/builds/nix-23824-685423193/tmp.aiu6ctU1Zs --seed 0xdf287f62 -Z3616cf2af5e3f32b -Demit-lib-vt -Doptimize=ReleaseFast -Dsimd=true -Dtarget=aarch64-macos -Dversion-string=1.3.2-HEAD-+0f7cd84b8 -Demit-xcframework=false

  thread 'main' (95545645) panicked at build.rs:78:5:
  zig build for vendored libghostty-vt failed: exit status: 1
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Expected behavior

I would expect the build to succeed and to have a runnable binary!

Reproduction

Run nix build -L nixpkgs#herdr if running the unstable branch on a MacOS device and you will get the error.

Impact

Can't run herdr via nix on MacOS systems

Environment

  • Herdr version: 0.7.0
  • Update channel (stable or preview): stable
  • Operating system: MacOS
  • Terminal: Ghostty
  • Shell, if relevant: fish
  • Relevant config, if any: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions