-
Notifications
You must be signed in to change notification settings - Fork 35
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
M1 Mac support #1
Comments
diff --git a/flake.lock b/flake.lock
index 60b86d5..4b2a246 100644
--- a/flake.lock
+++ b/flake.lock
@@ -33,11 +33,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1637533542,
- "narHash": "sha256-9jR9AOz4OZf4IxMdIgveOur8n5WbZJBAXtXOe434l78=",
+ "lastModified": 1637882183,
+ "narHash": "sha256-J2PoXItGsstIP4NoI36ipEgZMP8Hhht0HmwtvFyBHA0=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "b2181bc967053310657128d687e44ec683e7604b",
+ "rev": "96cf0b7f273370aaa4cdef40e0282a139170cba3",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index a927662..e151796 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,7 +8,7 @@
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
- flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system:
+ flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ] (system:
let
overlays = [ ];
pkgs =
@@ -27,11 +27,11 @@
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
# Specify your build/dev dependencies here.
- cabal-fmt
+ # cabal-fmt
cabal-install
- ghcid
- haskell-language-server
- ormolu
+ # ghcid
+ # haskell-language-server
+ # ormolu
pkgs.nixpkgs-fmt
]);
};
|
I should note this happens in nix-shell and not nix-build: NixOS/nixpkgs#147739 |
@sternenseemann - Any chance I can entertain your interest in this? I advanced Nixpkgs past your NixOS/nixpkgs#147260 hoping that that might fix it (maybe it fix the llvm error above), but still I can't build even cabal2nix (fails at |
I entertain the littlest interest in
Indeed, LLVM 9 was used for
Looking at the error it seems to me that this might be some kind of code signing issue, you should be able to confirm this using the At this point, I can't really guess what the issue might be. Worth a try might be recompiling GHC and the package set using LLVM 11. Regrettably, the contributed support for
Well, it is kind of hard to cache dependencies that don't build. |
While GHC now can be bootstrapped and built on aarch64-darwin, it seems to work only to an extent. All sorts of strange issues have manifested themselves in `haskellPackages` and downstream usage which leads me to conclude that it would be misleading to call it supported on this platform, especially in a stable channel. To give a few examples, separate bin outputs just don't work in general [1] and `opt` fails for unknown reasons in some derivations [2]. As I don't own any appropriate hardware, I have tried tackling these issues by staring into my crystal ball, but so far to no avail (even worse, new issues [3] have cropped up due to changes that should have been an improvement). Given these circumstances, I'm not willing to call GHC supported on aarch64-darwin for the stable channel. I'm (for now) hopeful that we can improve the situation on `master` going forward, but it is not guaranteed that these changes will be backportable without a ton of effort. Should it turn out that we can't resolve these issues or maintain GHC's aarch64-darwin support due to a lack of contributors going forward, I am also prepared to drop aarch64-darwin support completely. While it has been proclaimed a Tier 3 platform, I would argue that the “popular” package GHC has never been working, at least not properly. [1]: NixOS#140774 NixOS#140180 [2]: https://matrix.to/#/!RbXGJhHMsnQcNIDFWN:nixos.org/$C6FK74EajqSTk58JzriYpQJ9f6x3UH3tIREcn04Y-rM?via=nixos.org&via=matrix.org&via=tchncs.de [3]: srid/haskell-template#1 (comment)
Should be fixed on current nixpkgs master. |
Awesome, @sternenseemann ! 🕺🏿 It mostly works now after a0672b6. One final thing left to resolve is build failures for
Looks to be this issue: NixOS/nixpkgs#140774 |
Yes. |
Make
nix build
(andbin/run
) succeed on M1 Mac with native Nix installed.No rosetta.
nix build
worksnix develop
works, with HLS, ormolu, etc.The text was updated successfully, but these errors were encountered: