我正在努力建立
halite
default.nix
:
with import <nixpkgs> {};
stdenv.mkDerivation rec {
pname = "halite";
version = "git";
name = "${pname}-${version}";
src = ./.;
buildInputs = [ cmake ];
}
但是当我跑步的时候
nix-build default.nix
[ 97%] Building CXX object CMakeFiles/halite.dir/main.cpp.o
[100%] Linking CXX executable halite
/nix/store/z470j6lybdsy4ql972k392490bprhd2g-binutils-2.28.1/bin/ld: cannot find -lpthread
/nix/store/z470j6lybdsy4ql972k392490bprhd2g-binutils-2.28.1/bin/ld: cannot find -lm
/nix/store/z470j6lybdsy4ql972k392490bprhd2g-binutils-2.28.1/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
可以找到完整日志
here
我试图解决这个问题,但没有成功:
-
gcc
,
pkgconfig
到
buildInputs
-
nativeBuildInputs
和
propergatedBuildInputs
违约尼克斯
和
shell.nix
对于
cmake
项目