1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/wasm-pack/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
2020-02-11 10:34:23 +00:00
, libressl
2019-08-08 03:52:01 +01:00
, curl
, Security
}:
rustPlatform.buildRustPackage rec {
2019-08-31 12:41:23 +01:00
pname = "wasm-pack";
2020-02-11 10:34:23 +00:00
version = "0.9.1";
src = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-pack";
rev = "v${version}";
2020-02-11 10:34:23 +00:00
sha256 = "1rqyfg6ajxxyfx87ar25nf5ck9hd0p12qgv98dicniqag8l4rvsr";
};
cargoSha256 = "0fw04hgxxqsbp1pylp32yd087r9bb8bpa05v90qdshkgp6znfl9s";
nativeBuildInputs = [ pkg-config ];
2020-02-11 10:34:23 +00: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
] ++ lib.optionals stdenv.isDarwin [ curl Security ];
2019-08-08 03:52:01 +01:00
2020-02-11 10:34:23 +00:00
# Most tests rely on external resources and build artifacts.
# Disabling check here to work with build sandboxing.
doCheck = false;
meta = with lib; {
description = "A utility that builds rust-generated WebAssembly package";
homepage = "https://github.com/rustwasm/wasm-pack";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = [ maintainers.dhkl ];
};
}