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

Make it work for macOS #6

Open
kutyel opened this issue Jun 12, 2023 · 5 comments
Open

Make it work for macOS #6

kutyel opened this issue Jun 12, 2023 · 5 comments

Comments

@kutyel
Copy link

kutyel commented Jun 12, 2023

I tried running open $(nix build --print-out-paths)/index.html and I got the following:

error: attribute 'aarch64-darwin' missing

       at /nix/store/xxzb732dkcfnvz75wd41fwgv19fpwbv2-source/flake.nix:27:13:

           26|             inputs.nix-filter.overlays.default
           27|             inputs.safe-coloured-text.overlays.${system}
             |             ^
           28|           ];
(use '--show-trace' to show detailed location information)
The file /index.html does not exist.

Since Nix is great for cross platform stuff I would really like to be able to use this app from macOS 🙏🏻

@damianfral
Copy link
Owner

Hey @kutyel, since the safe-coloured-text input wasn't necessary, I've taken it out. Could you please attempt to build the project on a Mac?

@kutyel
Copy link
Author

kutyel commented Jul 31, 2023

error: Package ‘ghc-7.0.4-binary’ in /nix/store/hx9hsnvb3337ibh85qz1l06phb5yhj22-source/pkgs/development/compilers/ghc/7.0.4-binary.nix:22 is not supported on ‘aarch64-apple-darwin’, refusing to evaluate.

       a) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)
The file /index.html does not exist.

@damianfral
Copy link
Owner

damianfral commented Jul 31, 2023

It looks like those ghc binary packages aren't available for aarch64-apple-darwin systems (https://github.com/NixOS/nixpkgs/blob/0374fa23f67bc51a0374b8e3305913cbef624fc1/pkgs/development/compilers/ghc/8.6.5-binary.nix#L51-L82). I've replaced them in the latest commit. Give it another shot, could you? Thanks again!

@kutyel
Copy link
Author

kutyel commented Aug 1, 2023

unfortunately the same error 😢

error: Package ‘ghc-7.0.4’ in /nix/store/hx9hsnvb3337ibh85qz1l06phb5yhj22-source/pkgs/development/compilers/ghc/7.0.4.nix:57 is not supported on ‘aarch64-apple-darwin’, refusing to evaluate.

       a) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)
The file /index.html does not exist.

@damianfral
Copy link
Owner

❯ ag aarch64-dar nixpkgs/pkgs/development/compilers/ghc -l | sort -n
nixpkgs/pkgs/development/compilers/ghc/8.10.7-binary.nix
nixpkgs/pkgs/development/compilers/ghc/8.10.7.nix
nixpkgs/pkgs/development/compilers/ghc/9.0.2.nix
nixpkgs/pkgs/development/compilers/ghc/9.2.4-binary.nix
nixpkgs/pkgs/development/compilers/ghc/9.2.4.nix
nixpkgs/pkgs/development/compilers/ghc/9.2.5.nix
nixpkgs/pkgs/development/compilers/ghc/9.2.6.nix
nixpkgs/pkgs/development/compilers/ghc/9.2.7.nix
nixpkgs/pkgs/development/compilers/ghc/9.2.8.nix
nixpkgs/pkgs/development/compilers/ghc/9.4.2.nix
nixpkgs/pkgs/development/compilers/ghc/9.4.3.nix
nixpkgs/pkgs/development/compilers/ghc/9.4.4.nix
nixpkgs/pkgs/development/compilers/ghc/9.4.5.nix
nixpkgs/pkgs/development/compilers/ghc/Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch
nixpkgs/pkgs/development/compilers/ghc/common-hadrian.nix

The oldest ghc package that mentions aarch64-darwin is ghc-8.10.7 . I guess we cannot build older versions on a new Mac.

Since we need the ghc releases just to get the supported languages, you can download this tgz, which contains a txt with the supported languages for each release, unpack it and execute

nix run github:damianfral/ghcaniuse#ghcaniuse -- --directory ./ghc-language-extensions/

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