Skip to content

Conversation

Binlogo
Copy link

@Binlogo Binlogo commented Aug 22, 2025

Fix shell.nix for macOS compatibility and update to NixOS 24.11

  • Update from NixOS 25.05 (non-existent) to stable NixOS 24.11
  • Fix macOS build failure by properly handling Darwin frameworks
    without using deprecated darwin.apple_sdk
  • Add Security, CoreFoundation, and SystemConfiguration frameworks
    for macOS compatibility
  • Simplify Python environment setup for prysk testing, pin to specific
    version
  • Remove virtual environment in favor of user-space pip installation

Fixes #1429

@Binlogo
Copy link
Author

Binlogo commented Aug 22, 2025

@vlad-ivanov-name Would you mind reviewing this pull request? Thanks!

@vlad-ivanov-name
Copy link
Collaborator

Will review pending PRs this weekend, thanks for the ping.

shell.nix Outdated
# Install or upgrade prysk
echo "Installing/updating prysk..."
pip install --upgrade pip
pip install --upgrade prysk
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pin the version somehow? Ideally with a lockfile, and ideally with uv

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the diff this pinning used to be handled by nix itself so unless something radically changed in nix and we can't do it anymore, I'd keep it that way

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I forgot to mention that the prysk package is missing in the nixpkgs. I've tried to add it upstream but failed due to dependency issues. I'll try again as I become more familiar with nixpkgs. So, here's a workaround.

The uv package is an inspiring one to use here, and I will update it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see okay. So maybe then a uv setup with lockfile + a nix "layer" where uv installs prysk could work. I know we can't access internet normally in build step but it's possible with fixed output derivation

shell.nix Outdated
echo "Cargo version: $(cargo --version)"

# Install prysk using pip in a virtual environment
if [ ! -d ".venv" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it the job of nix to maintain the environment? Do we even need the venv

- Update from NixOS 25.05 (non-existent) to stable NixOS 24.11
- Fix macOS build failure by properly handling Darwin frameworks
  without using deprecated darwin.apple_sdk
- Add Security, CoreFoundation, and SystemConfiguration frameworks
  for macOS compatibility
- Simplify Python environment setup for prysk testing, pin to specific
version
- Remove virtual environment in favor of user-space pip installation

This resolves the "darwin.apple_sdk_11_0 has been removed" error
on macOS while maintaining all testing capabilities with prysk.

Fixes josh-project#1429
@Binlogo Binlogo force-pushed the issue/update-shell-nix branch from 2f1b608 to 33e12e6 Compare August 26, 2025 15:43
@Binlogo Binlogo changed the title Update shell.nix to use NixOS 25.05 and update cram to prsyk Update shell.nix to use NixOS 24.11 and update cram to prsyk Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

shell.nix outdated and failed on macOS: darwin.apple_sdk has been phased out.
2 participants