!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1147 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
2 Dec 2025
@reckenrode:matrix.orgRandy Eckenrode

The next problem will be System V semaphores. I posted a patch[4] that uses macOS futexes to implement semaphores (pretty much the same way libc does on some other systems), which would fix that version of the problem. But you could presumably already use the more wasteful
named POSIX semaphores.

19:34:15
@reckenrode:matrix.orgRandy Eckenrodehttps://www.postgresql.org/message-id/flat/CA+hUKGKRQrJhVYBkmLJZsScJ434qiduWzzpB0-0_FW8z1kTjcw@mail.gmail.com#19f7d84d058a908865bafbf82233a07f19:34:40
@weethet:catgirl.cloudWeetHetFor semaphores sure but semaphores aren't the biggest problem here19:34:44
@weethet:catgirl.cloudWeetHetShared memory is19:34:48
@reckenrode:matrix.orgRandy EckenrodeThe issue is what they’re using it for, isn’t it?19:35:09
@reckenrode:matrix.orgRandy EckenrodeFutexes can be shared between processes. The MSYNC patch for Wine did something similar.19:35:33
@weethet:catgirl.cloudWeetHethttps://github.com/postgres/postgres/blob/master/src/backend/port/sysv_shmem.c19:35:50
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/marzent/wine-msync19:36:16
@weethet:catgirl.cloudWeetHetI'm surprised that only postgres is running into these issues19:38:50
@weethet:catgirl.cloudWeetHetI would expect most databases to use shared memory in one way or another19:39:04
@reckenrode:matrix.orgRandy EckenrodeUse one of the other shared memory types for shared memory and futexes for protecting the data directory?19:39:09
@reckenrode:matrix.orgRandy Eckenrode * 19:39:54
@reckenrode:matrix.orgRandy EckenrodeDoesn’t Postgres spawn a process per user?19:40:30
@weethet:catgirl.cloudWeetHetIs there any other shared memory type on macOS though19:55:51
@reckenrode:matrix.orgRandy EckenrodePOSIX shared memory. It’s what Apple recommends.20:02:05
@reckenrode:matrix.orgRandy Eckenrodehttps://developer.apple.com/forums/thread/719897?answerId=736261022#73626102220:02:14
@niklaskorz:matrix.orgniklaskorz reading the postgres source and the issue emily linked, they alread default to mmap, but still need the sysv shared memory to detect which processes are attached to it (I guess that implies this is not possible in posix?) 20:12:59
@antifuchs:asf.computerantifuchs

so I have an issue with users.users / users.knownUsers on nix-darwin; I'm trying to have nix-darwin create a user, but (after a bunch of swearing & reading the activate script in the built system closure) it seems to expect that the user needs to be deleted? here's what I configure, is there anything wrong with it?

  users.knownGroups = [ "ci-worker" ];
  users.knownUsers = [ "ci-worker" ];
  users.groups.ci-worker = {
    gid = 502;
  };
  users.users.ci-worker = {
    createHome = false;
    description = "Nix Build support user for remote builds from CI";
    home = "/var/empty";
    shell = pkgs.bashInteractive;
    name = "Nix Build CI Worker";
    uid = 502;
    gid = 502;
    openssh.authorizedKeys.keys = [
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGFg7XQg/ACCFIL0f2OJoU0EIcQFuwa3qz7pQNzmDe2W root@gloria"
    ];
  };
20:36:16
@antifuchs:asf.computerantifuchs(creating a home dir or anything else seems to have no effect on the "should be present" calculation)20:36:50
@reckenrode:matrix.orgRandy EckenrodeRedacted or Malformed Event20:37:12
@reckenrode:matrix.orgRandy Eckenrode Per the issue emily linked and the part I quoted, named POSIX semaphores are apparently more wasteful. There is a patch to implement the functionality using futexes on Darwin. No idea how well it works. 20:37:37
@antifuchs:asf.computerantifuchs update: the user is missing a name attribute. without that, the check in https://github.com/nix-darwin/nix-darwin/blob/e95de00a471d07435e0527ff4db092c84998698e/modules/users/default.nix#L20 counts the user as not-intended-to-be-created 20:45:24
@antifuchs:asf.computerantifuchs * update: the user doesn't have a matching name attribute. without that, the check in https://github.com/nix-darwin/nix-darwin/blob/e95de00a471d07435e0527ff4db092c84998698e/modules/users/default.nix#L20 counts the user as not-intended-to-be-created 20:45:42
3 Dec 2025
@reckenrode:matrix.orgRandy EckenrodeThe C++ bootstrap compiler can’t even use the 14.4 SDK.03:37:00
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/swiftlang/swift/pull/8441303:37:01
@reckenrode:matrix.orgRandy EckenrodeI need to see if I can revert https://github.com/swiftlang/swift/pull/79186. Otherwise, that issue in 84413 prevents building against the 14.4 SDK.03:37:54
@reckenrode:matrix.orgRandy Eckenrode

FAILED: bootstrapping1/SwiftCompilerSources/Basic.o /nix/var/nix/builds/nix-build-swiftc-6.2.1+bootstrap.drv-0/b/source/build/bootstrapping1/SwiftCompilerSources/Basic.o
cd /nix/var/nix/builds/nix-build-swiftc-6.2.1+bootstrap.drv-0/b/source/SwiftCompilerSources && /nix/var/nix/builds/nix-build-swiftc-6.2.1+bootstrap.drv-0/b/source/build/bootstrapping0/bin/swiftc -c -o /nix/var/nix/builds/nix-buil>
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: '/nix/var/nix/builds/nix-build-swiftc-6.2.1+bootstrap.drv-0/b/source/build/bootstrapping0/bin/swift-driver-new'
/nix/store/bj5iys7xm7ba8xxsc6hb9q6zv9x5igs2-apple-sdk-14.4/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/lib/swift/Swift.swiftmodule/arm64e-apple-macos.swiftinterface:10062:3: error: missing return in instance metho>
10060 |     }
10061 |     while true
10062 |   }
      |   `- error: missing return in instance method expected to return 'FlattenSequence<Base>.Iterator.Element?' (aka 'Optional<Base.Element.Element>')
10063 | }
10064 | extension Swift.FlattenSequence.Iterator : Swift.Sequence {
03:38:08
@reckenrode:matrix.orgRandy EckenrodeThough. Hmm. I wonder if swift-driver works.03:38:43
@reckenrode:matrix.orgRandy EckenrodeWhy isn’t it setting it up?03:38:50
@reckenrode:matrix.orgRandy EckenrodeNope. I may have to try to revert that change.04:24:00

Show newer messages


Back to Room ListRoom Version: 6