我试图构建一个POC,使用反射和图表。我在Ubuntu-20.04中使用WSL2。我使用了反射石模板,它构建得很好。然后我将图表库添加到依赖项列表中,并获得此错误。
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 ++的测试。
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;
};但没有效果。有一个图表-反射回购,但我也不能让它构建。不过,我对尼克斯很陌生。
发布于 2022-06-02 01:09:12
似乎可以通过重写nixpkgs来使用更新的zlib版本来解决这个问题(至少在这里是这样的),并且对ghcjs有更好的支持。
这件事最终为我工作:
overrides = self: super: {
diagrams-lib = pkgs.haskell.lib.dontCheck super.diagrams-lib;
JuicyPixels = pkgs.haskell.lib.dontCheck super.JuicyPixels;
zlib = self.callHackageDirect {
pkg = "zlib";
ver = "0.6.3.0";
sha256 = "3PLCQ94ONQtjQc8AqVMgCVrZZW766T8PDevOvKC4VDw=";
} {};
};https://stackoverflow.com/questions/66005898
复制相似问题