Make it work for macOS
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 🙏🏻
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?
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.
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!
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.
❯ 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/