Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcode paths being set by devenv. #1674

Open
niteshbalusu11 opened this issue Jan 15, 2025 · 6 comments · May be fixed by #1686
Open

xcode paths being set by devenv. #1674

niteshbalusu11 opened this issue Jan 15, 2025 · 6 comments · May be fixed by #1686
Labels
question Further information is requested

Comments

@niteshbalusu11
Copy link

I am unable to understand where nix is setting xcode paths. I removed all react-native related things in my devenv file and left only android, may I know why ios paths are being set? I am unable to override them.

My devenv.nix file

{ pkgs, lib, config, inputs, ... }:
{
  android = {
    platforms.version = [ "35" "34" ];
    enable = true;
    android-studio.enable = false;
    platformTools.version = "35.0.2";
    ndk = {
      enable = true;
      version = [ "25.1.8937393" "26.1.10909125" ];
    };
    buildTools.version = [ "35.0.0" "34.0.0" ];
  };

  languages.javascript.enable = true;
  languages.javascript.bun.enable = true;

}

inside my project directory:

❯ xcode-select -p
/nix/store/2y71rl5mnazwnpwpcq07xx97jl7sy5lh-apple-sdk-11.3

outside my project directory:

❯ xcode-select -p
/Applications/Xcode.app/Contents/Developer
@niteshbalusu11 niteshbalusu11 added the question Further information is requested label Jan 15, 2025
@niteshbalusu11
Copy link
Author

Yeah, I can confirm devenv is setting SDK paths, I am unable to override them.

@niteshbalusu11
Copy link
Author

Looks like related issue.

#1641

@sandydoo
Copy link
Member

xcode looks for the DEVELOPER_DIR environment variable. You can try adding unset DEVELOPER_DIR to enterShell.

Not sure if there's a more elegant way of removing the apple-sdk from the stdenv at the moment.

@sandydoo
Copy link
Member

Another way:

devenv.nix:

{ pkgs, lib, config, inputs, ... }:

{
  stdenv = pkgs.stdenv.override {
    extraBuildInputs = [ ];
  };
}

@niteshbalusu11
Copy link
Author

I switched to using devenv with flakes and it seems to be working, idk why it works differently with this.

https://devenv.sh/guides/using-with-flakes/

@sandydoo
Copy link
Member

I switched to using devenv with flakes and it seems to be working, idk why it works differently with this.

Functionally the same thing. The only difference would be the version of nixpkgs.

@sandydoo sandydoo linked a pull request Jan 24, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants