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

attribute 'stdenv' missing when installing obelisk on macos #873

Closed
manyoo opened this issue Sep 30, 2021 · 2 comments
Closed

attribute 'stdenv' missing when installing obelisk on macos #873

manyoo opened this issue Sep 30, 2021 · 2 comments

Comments

@manyoo
Copy link

manyoo commented Sep 30, 2021

Hi, I'm new to obelisk and especially Nix. I tried to install obelisk following the instructions. I'm on a M1 MacBook Air with macOS Big Sur 11.6. Installed nix 2.3.15 and then try installing obelisk with:

nix-env -f https://github.com/obsidiansystems/obelisk/archive/master.tar.gz -iA command
but I get the following error:

~ nix-env -f https://github.com/obsidiansystems/obelisk/archive/master.tar.gz -iA command
unpacking 'https://github.com/obsidiansystems/obelisk/archive/master.tar.gz'...
unpacking 'https://github.com/reflex-frp/reflex-platform/archive/27a7851a780ff21472d85f9a02fb84635ef9027a.tar.gz'...
unpacking 'https://github.com/obsidiansystems/nixpkgs/archive/e6e5ff9cb3529b6de75e5d217222086de17e093a.tar.gz'...
unpacking 'https://github.com/hercules-ci/gitignore.nix/archive/7415c4feb127845553943a3856cbc5cb967ee5e0.tar.gz'...
error: attribute 'stdenv' missing, at /nix/store/bblbjmnzbzfib5q0r7xbk1c920bsabbw-source/pkgs/build-support/cc-wrapper/default.nix:62:8
(use '--show-trace' to show detailed location information)

Is this a bug in obelisk or Nix? Any idea on work around it and install obelisk? Thanks!

@pghalliday
Copy link

pghalliday commented Dec 6, 2021

Me too on M1 macbook pro with MacOS Monterey 12.0.1

@manyoo
Copy link
Author

manyoo commented Dec 6, 2021

Me too on M1 macbook pro with MacOS Monterey 12.0.1

I should close this issue, because it's due to obelisk doesn't support ARM yet. The workaround is to re-install Nix x86 version, instead of the default ARM version. I downloaded the nix install script and changed the "system" variable to x86_64-darwin statically, then run the script to install. I've also added "system = x86_64-darwin" to /etc/nix/nix.conf so nix can always use x86 packages.

With the new nix installed, you can install obelisk again. obelisk works for simple demo projects. But due to obelisk and reflex-platform depends on older version of nixpkgs (20.09), which doesn't support macOS's new linker since BigSur, nixpkgs#91748, it won't work when more dependencies added. So, generally, obelisk doesn't work on Mac (intel and m1) for now. The best solution to this problem is updating obelisk and reflex-platform to nixpkgs 21.05 at least. @Ericson2314 mentioned they're working on that. @o1lo01ol1o tried to backport the nixpkgs fix back to 20.09, but it will re-compile almost all packages due to no binary cache available. I tried twice and both failed. You can learn more about it here: obelisk#869.

Currently, I run obelisk on a linux machine, and use VSCode on my Mac with remote ssh plugin to code. It has all ghcide features available as well.

@manyoo manyoo closed this as completed Dec 6, 2021
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

No branches or pull requests

2 participants