depot/third_party/nixpkgs/pkgs/by-name/wa/wasm-pack/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

49 lines
1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
darwin,
cmake,
pkg-config,
zstd,
}:
rustPlatform.buildRustPackage rec {
pname = "wasm-pack";
version = "0.13.1";
src = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-pack";
tag = "v${version}";
hash = "sha256-CN1LcLX7ag+in9sosT2NYVKfhDLGv2m3zHOk2T4MFYc=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-nYWvk2v+4IAk/y7fg+Z/nMH+Ml+J5k5ER8uudCQOMB8=";
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Security ++ [
zstd
];
# Most tests rely on external resources and build artifacts.
# Disabling check here to work with build sandboxing.
doCheck = false;
meta = with lib; {
description = "Utility that builds rust-generated WebAssembly package";
mainProgram = "wasm-pack";
homepage = "https://github.com/rustwasm/wasm-pack";
license = with licenses; [
asl20 # or
mit
];
maintainers = [ maintainers.dhkl ];
};
}