2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, lib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "wasilibc-20190712";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CraneStation";
|
|
|
|
repo = "wasi-libc";
|
|
|
|
rev = "8df0d4cd6a559b58d4a34b738a5a766b567448cf";
|
|
|
|
sha256 = "1n4gvgzacpagar2mx8g9950q0brnhwz7jg2q44sa5mnjmlnkiqhh";
|
|
|
|
};
|
|
|
|
makeFlags = [
|
|
|
|
"WASM_CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
"WASM_NM=${stdenv.cc.targetPrefix}nm"
|
|
|
|
"WASM_AR=${stdenv.cc.targetPrefix}ar"
|
|
|
|
"INSTALL_DIR=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/lib/*/* $out/lib
|
|
|
|
ln -s $out/share/wasm32-wasi/undefined-symbols.txt $out/lib/wasi.imports
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "WASI libc implementation for WebAssembly";
|
|
|
|
homepage = "https://wasi.dev";
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.wasi;
|
|
|
|
maintainers = [ maintainers.matthewbauer ];
|
|
|
|
license = with licenses; [ asl20 mit llvm-exception ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|