!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1167 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org188 Servers

Load older messages


SenderMessageTime
6 Dec 2025
@reckenrode:matrix.orgRandy EckenrodeI wonder if I can do something hacky to swift-toolchain-sqlite to make it devendor sqlite. 🤔12:44:26
@vcunat:matrix.orgvcunat

Ever seen something like this?

  File "/nix/store/b229zll0pw9ljig3jblh2fda9in786i8-python3.13-knot-resolver-manager_6-6.0.17/bin/knot-resolver", line 2
    PATH=${PATH:+':'$PATH':'}
         ^
SyntaxError: invalid syntax

This wrapper stuff is auto-generated by buildPythonPackage and it does work on linux.

13:24:41
@vcunat:matrix.orgvcunat(except for a tiny non-python patch changing this hash, it's all just nixpkgs master)13:27:22
@vcunat:matrix.orgvcunatOh, does macOS behave different than Linux around executing scripts? 🤔13:28:36
@vcunat:matrix.orgvcunati.e. maybe it's syntax error because a wrong interpreter is used?13:29:33
@k900:0upti.meK900That's a Python syntax error13:29:55
@k900:0upti.meK900In a script with clearly bash syntax13:30:00
@k900:0upti.meK900 So something is trying to call python <bash script> 13:30:12
@vcunat:matrix.orgvcunatHmm, thanks. I think this moves me in a hopeful direction.13:32:28
@vcunat:matrix.orgvcunatI see. It's an unexpected interaction of nix-specific wrapping machinery with OS-specific piece of code from upstream.13:47:44
@vcunat:matrix.orgvcunat(when the script attempts to reexecute itself)13:48:07
@emilazy:matrix.orgemilyshebangs don't work with shell wrappers on macOS15:57:16
@emilazy:matrix.orgemily i.e. if #!/nix/store/foo, then foo must be a makeBinaryWrapper rather than a shell wrapper 15:57:28
@emilazy:matrix.orgemilyperhaps something around that15:57:34
@thetaoofsu:matrix.org@thetaoofsu:matrix.org left the room.18:54:47
@reckenrode:matrix.orgRandy Eckenrode

       (2708 duplicate frames omitted)

       error: stack overflow; max-call-depth exceeded
       at /Users/reckenrode/Developer/nixpkgs/lib/fixed-points.nix:325:16:
          324|       let
          325|         prev = f final;
             |                ^
          326|       in
19:01:33
@reckenrode:matrix.orgRandy EckenrodeI managed a stack overflow without triggering an infinite recursion. 🤔19:01:50
@toonn:matrix.orgtoonn That's what we call sharpshooting : D 19:10:11
@reckenrode:matrix.orgRandy Eckenrode I think the problem is how I was trying to set up the Swift bootstrap. Because I already have a scope, I do overrideScope in the scope definition to declare a bootstrap version of the scope. I defined swift-bootstrap in the real scope as bootstrapSwiftPackages.swift, which uses swift-bootstrap to compile swiftc. 19:12:13
@reckenrode:matrix.orgRandy EckenrodeFortunately, I found a way around it. Once I have SwiftPM not causing an infinite recursion, I’ll share the scope.19:19:56
@reckenrode:matrix.orgRandy Eckenrode Also, llvm-install-name-tool supports -delete_all_rpaths, which the cctools one does not. That’s pretty handy. 19:20:30
@reckenrode:matrix.orgRandy Eckenrode(I tried making LLVM bintools the default for building Swift, but there is some work that needs to be done to make LLD actually work as a default linker on Darwin. The wrapper is not set up for it.)19:21:06
@reckenrode:matrix.orgRandy Eckenrode * 19:21:20
@reckenrode:matrix.orgRandy Eckenrode
let
  autoCalledPackages = import ./by-name-overlay.nix ../by-name/sw/swiftPackages/by-name;
in

{
  lib,
  clangStdenv,
  generateSplicesForMkScope,
  llvmPackages,
  makeScopeWithSplicing',
  otherSplices ? generateSplicesForMkScope "swiftPackages",
}:

makeScopeWithSplicing' {
  inherit otherSplices;
  extra =
    self:
    let
      bootstrapSwiftPackages = self.overrideScope (
        final: prev: {
          swift-driver = prev.swift-driver.override { enableCmakeBuild = true; };
          swiftpm = prev.swiftpm.override { enableCmakeBuild = true; };
          swift-bootstrap = prev.swiftc.override { swift-bootstrap = null; };
        }
      );
    in
    {
      inherit (self.swift) mkSwiftPackage;
      llvmPackages_current = llvmPackages;
      swift-bootstrap = bootstrapSwiftPackages.swift;
      swiftpmHook-bootstrap = self.swiftpmHook.override { swiftpm = bootstrapSwiftPackages.swiftpm; };
    };
  f = lib.extends autoCalledPackages (self: {
    stdenv = clangStdenv;
    swift_release = "6.2.1";
  });
}
19:30:27
7 Dec 2025
@reckenrode:matrix.orgRandy EckenrodeMy current status is I’m working through dependencies trying to build them how Apple distributes Swift (e.g., llbuild as a framework, etc).04:21:28
@weethet:catgirl.cloudWeetHetI wonder if iTerm would be buildable from source after the swift work is done13:55:49
@weethet:catgirl.cloudWeetHetAnd if people would even want it to be since that would mess the privileges on each update13:56:12
@weethet:catgirl.cloudWeetHet* And if people would even want it to be since that would mess the privileges up on each update13:56:17
@reckenrode:matrix.orgRandy EckenrodeWe stopped building it because it relies on entitlements for security.13:56:56
@weethet:catgirl.cloudWeetHet* And if people would even want it to be since that would mess the permissions up on each update14:01:14

Show newer messages


Back to Room ListRoom Version: 6