我正在尝试使用 Reflex 和 Diagrams 构建 POC。我将 WSL2 与 Ubuntu-20.04 一起使用。我使用了Reflex-stone模板,它构建得很好。然后我将 diagrams-lib 添加到依赖项列表中,并收到此错误。
xeno@PCB-CWO:/mnt/c/Users/CWO/repos/reflex-platform/Animazing$ nix-build --show-trace
error: while evaluating the attribute 'buildCommand' of the derivation 'reflex-stone-site' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildInputs' of the derivation 'reflex-stone-0.1.0.0-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'diagrams-lib-1.4.2.3-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'propagatedBuildInputs' of the derivation 'JuicyPixels-3.3.3.1-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'buildInputs' of the derivation 'zlib-0.6.2.1-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'makeFlags' of the derivation 'zlib-1.2.11-js-unknown-ghcjs' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/make-derivation.nix:197:11:
while evaluating the attribute 'cc.targetPrefix' at /nix/store/p3x4ha4dwj9agifi05wq0vf3m93p3vsx-source/pkgs/stdenv/generic/default.nix:158:14:
no C compiler provided for this platform
我得到了一些帮助,有人建议这可能是一个需要 c 的测试。所以我将此添加到我的 project.nix
overrides = self: super: {
diagrams-lib = pkgs.haskell.lib.dontCheck super.diagrams-lib;
JuicyPixels = pkgs.haskell.lib.dontCheck super.JuicyPixels;
zlib = pkgs.haskell.lib.dontCheck super.zlib;
};
但没有任何效果。存在一个 Diagrams-Reflex repo,但我也无法构建它。不过,我对 Nix 很陌生。