Add package separation for nix-darwin users with a macOS Sdk installation present - #11667
Closed
haze wants to merge 2 commits into
Closed
Add package separation for nix-darwin users with a macOS Sdk installation present#11667haze wants to merge 2 commits into
haze wants to merge 2 commits into
Conversation
kubkon
requested changes
May 18, 2022
| lib_dirs: ArrayList([:0]u8), | ||
| framework_dirs: ArrayList([:0]u8), | ||
|
|
||
| nix_framework_dirs: ArrayList([:0]u8), |
Member
There was a problem hiding this comment.
I think we should figure out a way of satisfying nix-darwin without such special-casing like that.
Contributor
Author
There was a problem hiding this comment.
All nix users will have this problem. It's just that Darwin users also have an sdk root, so Zig attempts to add the paths in relation to, which is incorrect. It's not special casing it's support.
Contributor
Author
|
repro: test_time.c #include <time.h>
#include <stdio.h>
int main() {
struct timespec time;
int status = clock_gettime(CLOCK_REALTIME, &time);
printf("%ld\n", time.tv_sec);
}shell.nix { pkgs ? import <nixpkgs> {}, pkgs_unstable ? import <nixpkgs-unstable> {}, }:
pkgs.mkShell {
nativeBuildInputs = [
pkgs.llvmPackages_13.libclang
pkgs.darwin.apple_sdk.MacOSX-SDK
];
}(this gives you a library and also a clang to test against that doesn't have the sysroot baked in) |
devins2518
reviewed
Jun 5, 2022
haze
force-pushed
the
haze/nix-darwin-fixes
branch
2 times, most recently
from
June 6, 2022 02:39
88a4042 to
ad186a0
Compare
haze
force-pushed
the
haze/nix-darwin-fixes
branch
from
June 21, 2022 04:57
ad186a0 to
ccb8f63
Compare
…who have packages installed that aren't relative to an existing SDK root
andrewrk
force-pushed
the
haze/nix-darwin-fixes
branch
from
December 12, 2022 02:47
ccb8f63 to
429b1b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
nix_include_dirsandnix_framework_dirsfor nix-darwin users who have packages installed that aren't relative to an existing SDK root(this makes it so zig can find and build against c libraries provided by a shell.nix)