In reply to @skeuchel:matrix.org
tau: Here is a minimal flake that at least evaluates
{
inputs = {
nixpkgs.url = "github:AlexandreTunstall/nixpkgs/ghc-cross";
};
outputs = { nixpkgs, ... }:
{
nixosConfigurations.riscv64 = nixpkgs.lib.nixosSystem {
modules = [({lib, pkgs, ...}: {
nixpkgs.crossSystem.system = "riscv64-linux";
nixpkgs.localSystem.system = "x86_64-linux";
environment.systemPackages = [
pkgs.haskell.compiler.native-bignum.ghc948
];
# Dummy values
fileSystems."/".device = lib.mkDefault "/dev/sda1";
boot.loader.grub.device = lib.mkDefault "/dev/sda";
})];
};
};
}
Maybe you can use that to figure out what is going wrong.
i really don't understand why it's not building, i added the crossSystem and localSystem options,
┏━ 1 Errors:
⋮
┃ 182| buildCommand = ''
┃ | ^
┃ 183| mkdir -p $out/nix-support $out/sd-image
┃
┃ (stack trace truncated; use '--show-trace' to show the full trace)
┃
┃ error: Package ‘ghc-9.6.4’ in /nix/store/y45vqv6pa8bhgag1dw86rvi6rk55xhxn-source/pkgs/development/compilers/ghc/common-hadrian.nix:525 is not available o…
┃ hostPlatform.config = "riscv64-unknown-linux-gnu"
┃ package.meta.platforms = [
┃ "aarch64-darwin"
┃ "aarch64-linux"
┃ "i686-linux"
┃ "x86_64-darwin"
┃ "x86_64-linux"
┃ ]
┃ package.meta.badPlatforms = [ ]
┃ , refusing to evaluate.
┃
┃ a) To temporarily allow packages that are unsupported for this system, you can use an environment variable
┃ for a single invocation of the nix tools.
┃
┃ $ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
┃
┃ Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
┃ then pass `--impure` in order to allow use of environment variables.
┃
┃ b) For `nixos-rebuild` you can set
┃ { nixpkgs.config.allowUnsupportedSystem = true; }
┃ in configuration.nix to override this.
┃
┃ c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
┃ { allowUnsupportedSystem = true; }
┃ to ~/.config/nixpkgs/config.nix.
┣━━━
┗━ ∑ ⚠ Exited with 1 errors reported by nix at 00:52:48 after 7s
|