nixpkgs/pkgs/development/tools/wasm-pack/default.nix
Masanori Ogino 3daad69057 wasm-pack: update deps
Signed-off-by: Masanori Ogino <167209+omasanori@users.noreply.github.com>
2021-02-24 20:57:07 +09:00

47 lines
1.1 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, libressl
, curl
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "wasm-pack";
version = "0.9.1";
src = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-pack";
rev = "v${version}";
sha256 = "1rqyfg6ajxxyfx87ar25nf5ck9hd0p12qgv98dicniqag8l4rvsr";
};
cargoPatches = [
./update-deps.patch
];
cargoSha256 = "0br7r8wz3knzgl3gjpq6z8w33my0yiaq711s1wih9jizhia02y5r";
nativeBuildInputs = [ pkg-config ];
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 ];
# 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 ];
};
}