nixpkgs/pkgs/development/tools/wasm-pack/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
2020-02-11 10:34:23 +00:00
, libressl
2019-08-08 02:52:01 +00:00
, curl
, Security
}:
rustPlatform.buildRustPackage rec {
2019-08-31 11:41:23 +00:00
pname = "wasm-pack";
2022-07-31 05:53:30 +00:00
version = "0.10.3";
src = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-pack";
rev = "v${version}";
2022-07-31 05:53:30 +00:00
sha256 = "sha256-5AhHh/ycoNhhCH30RXvW6MyJkscrjFW+pvudw0MXieU=";
};
2022-07-31 05:53:30 +00:00
cargoSha256 = "sha256-4TKu9O5jLac5kLZF53DGjxEPize8jZm2B+CurelzSuo=";
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 02:52:01 +00:00
2021-09-20 19:38:53 +00:00
# Needed to get openssl-sys to use pkg-config.
OPENSSL_NO_VENDOR = 1;
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 ];
};
}