!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
6 Dec 2025
@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
@weethet:catgirl.cloudWeetHet(That's the reason I'm running a binary build of Zed even though nixpkgs has a from-source one)14:01:50
@weethet:catgirl.cloudWeetHetJIT and Apple Events don't need anything except a self signature AFAIK and the personal-information ones aren't exactly necessary for iTerm to function14:24:17
@weethet:catgirl.cloudWeetHetAt least providing a from source build with reduced entitlement set would be nice14:24:42
@reckenrode:matrix.orgRandy EckenrodeSome things (like the AI and the browser plugin) enable the app sandbox via entitlement.14:29:41
@reckenrode:matrix.orgRandy Eckenrode
ninja: error: '/nix/store/fc9wkimiw706hdhxhk13mfcicaacjzlq-swift-llbuild-6.2.1/Library/Frameworks/llbuild.framework/llbuild.framework/llbuild', needed by 'lib/libSwiftDriverExecution.dylib', missing and no known rule to make it
21:44:40
@reckenrode:matrix.orgRandy EckenrodeCMake is finding the framework, but it is very confused about where the framework is. Anyone know enough CMake to know why it would do that?21:44:56
8 Dec 2025
@reckenrode:matrix.orgRandy Eckenrode

Oh.

  if(NOT TARGET llbuildSwift)
    add_library(llbuildSwift UNKNOWN IMPORTED)
    set_target_properties(llbuildSwift PROPERTIES
      FRAMEWORK TRUE
      INTERFACE_COMPILE_OPTIONS -F${llbuild_FRAMEWORKS}
      IMPORTED_LOCATION ${llbuild_FRAMEWORKS}/llbuild.framework/llbuild)
  endif()
00:42:21
@reckenrode:matrix.orgRandy EckenrodeProbably that don’t the wrong thing.00:42:31
@reckenrode:matrix.orgRandy EckenrodeWhy does CMake set the deployment target to macOS 26 for Swift? ☹️01:59:51
@reckenrode:matrix.orgRandy EckenrodeIt goes off the triple, which defaults to 26.0 on my system. That’s a lovely impurity.02:16:44
@reckenrode:matrix.orgRandy EckenrodeAlso, CMake doesn’t handle mixed language modules at all. You have to manually generate a bunch of yaml.02:17:01
@reckenrode:matrix.orgRandy Eckenrodehttps://www.swift.org/documentation/articles/wrapping-c-cpp-library-in-swift.html#cmake02:17:14
@reckenrode:matrix.orgRandy EckenrodeI wonder if Nix could (ab)use VFS overlays with Clang instead of doing the hacks we do today to make Nix stuff play nicely with unwrapped compilers.02:18:38
@reckenrode:matrix.orgRandy EckenrodeLike just magically have the libc++ headers of your choice appear as if they were in the sysroot.02:19:06
@reckenrode:matrix.orgRandy Eckenrodehttps://forums.swift.org/t/relationship-if-any-between-import-underlying-module-and-emit-objc-header/61287/402:21:47
@tiferrei:tiferrei.comtiferrei Hi folks, I seem to have corrupted my nix db somehow, I keep getting warning: error: SQLite database '/nix/var/nix/db/db.sqlite' is busy in most operations. What is the best way to sort this out? (Lix, nix-darwin) Thanks! 10:23:49
@tiferrei:tiferrei.comtiferreiFixed: Nuked the nix-darwin installation, then the whole nix installation. reinstalled nix and reapplied nix-darwin.12:31:58

There are no newer messages yet.


Back to Room ListRoom Version: 6