git.iko.soy/typeable/nixpkgs
on master help sign in
wasilibc: 20190712 -> unstable-2021-09-23
commit47ca51cba9d997be0be4b93f9757d3a04a1a8b79 authorMartin Weinelt <hexa@darmstadt.ccc.de> dateWed 9 Mar 2022, 19:34 (5 years ago) parent5cd57cc
1 file changed+24−9
pkgs/development/libraries/wasilibc/default.nix+24−9
pkgs/development/libraries/wasilibc/default.nix+24−9
@@ -1,14 +1,27 @@
1−{ stdenv, fetchFromGitHub, lib }:
1+{ stdenv, buildPackages, fetchFromGitHub, lib }:
22
33stdenv.mkDerivation {
44 pname = "wasilibc";
5− version = "20190712";
6− src = fetchFromGitHub {
7− owner = "CraneStation";
5+ version = "unstable-2021-09-23";
6+
7+ src = buildPackages.fetchFromGitHub {
8+ owner = "WebAssembly";
89 repo = "wasi-libc";
9− rev = "8df0d4cd6a559b58d4a34b738a5a766b567448cf";
10− sha256 = "1n4gvgzacpagar2mx8g9950q0brnhwz7jg2q44sa5mnjmlnkiqhh";
10+ rev = "ad5133410f66b93a2381db5b542aad5e0964db96";
11+ hash = "sha256-RiIClVXrb18jF9qCt+5iALHPCZKYcnad7JsILHBV0pA=";
12+ fetchSubmodules = true;
1113 };
14+
15+ # clang-13: error: argument unused during compilation: '-rtlib=compiler-rt' [-Werror,-Wunused-command-line-argument]
16+ postPatch = ''
17+ substituteInPlace Makefile \
18+ --replace "-Werror" ""
19+ '';
20+
21+ preBuild = ''
22+ export NIX_CFLAGS_COMPILE="-I$(pwd)/sysroot/include $NIX_CFLAGS_COMPILE"
23+ '';
24+
1225 makeFlags = [
1326 "WASM_CC=${stdenv.cc.targetPrefix}cc"
1427 "WASM_NM=${stdenv.cc.targetPrefix}nm"
@@ -16,6 +29,8 @@ stdenv.mkDerivation {
1629 "INSTALL_DIR=${placeholder "out"}"
1730 ];
1831
32+ enableParallelBuilding = true;
33+
1934 postInstall = ''
2035 mv $out/lib/*/* $out/lib
2136 ln -s $out/share/wasm32-wasi/undefined-symbols.txt $out/lib/wasi.imports
@@ -23,9 +38,9 @@ stdenv.mkDerivation {
2338
2439 meta = with lib; {
2540 description = "WASI libc implementation for WebAssembly";
26− homepage = "https://wasi.dev";
27− platforms = platforms.wasi;
28− maintainers = [ maintainers.matthewbauer ];
41+ homepage = "https://wasi.dev";
42+ platforms = platforms.wasi;
43+ maintainers = with maintainers; [ matthewbauer ];
2944 license = with licenses; [ asl20 mit llvm-exception ];
3045 };
3146}