2019-04-01 03:48:12 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkgconfig
|
2020-02-11 11:34:23 +01:00
|
|
|
, libressl
|
2019-08-08 04:52:01 +02:00
|
|
|
, curl
|
|
|
|
, Security
|
2019-04-01 03:48:12 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 13:41:23 +02:00
|
|
|
pname = "wasm-pack";
|
2020-02-11 11:34:23 +01:00
|
|
|
version = "0.9.1";
|
2019-04-01 03:48:12 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rustwasm";
|
|
|
|
repo = "wasm-pack";
|
|
|
|
rev = "v${version}";
|
2020-02-11 11:34:23 +01:00
|
|
|
sha256 = "1rqyfg6ajxxyfx87ar25nf5ck9hd0p12qgv98dicniqag8l4rvsr";
|
2019-04-01 03:48:12 +02:00
|
|
|
};
|
|
|
|
|
2020-02-29 17:02:45 +01:00
|
|
|
cargoSha256 = "0fw04hgxxqsbp1pylp32yd087r9bb8bpa05v90qdshkgp6znfl9s";
|
2019-04-01 03:48:12 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
2020-02-11 11:34:23 +01:00
|
|
|
buildInputs = [
|
|
|
|
# LibreSSL works around segfault issues caused by OpenSSL being unable to
|
|
|
|
# gracefully exit while doing work.
|
|
|
|
# See: https://github.com/rustwasm/wasm-pack/issues/650
|
|
|
|
libressl
|
|
|
|
] ++ stdenv.lib.optionals stdenv.isDarwin [ curl Security ];
|
2019-08-08 04:52:01 +02:00
|
|
|
|
2020-02-11 11:34:23 +01:00
|
|
|
# Most tests rely on external resources and build artifacts.
|
|
|
|
# Disabling check here to work with build sandboxing.
|
2019-04-01 03:48:12 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A utility that builds rust-generated WebAssembly package";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/rustwasm/wasm-pack";
|
2019-04-01 03:48:12 +02:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = [ maintainers.dhkl ];
|
|
|
|
};
|
|
|
|
}
|