nixpkgs/pkgs/development/tools/wasm-bindgen-cli/default.nix
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00

37 lines
1.0 KiB
Nix

{ rustPlatform, fetchFromGitHub, lib, openssl, pkg-config, stdenv, curl, Security
, runCommand
}:
rustPlatform.buildRustPackage rec {
pname = "wasm-bindgen-cli";
version = "0.2.69";
src =
let
tarball = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-bindgen";
rev = version;
sha256 = "1psylk3hlx0ahwib3ph8qdk0jwlp8qzc6dv61002rj7ns28vs4mx";
};
in runCommand "source" { } ''
cp -R ${tarball} $out
chmod -R +w $out
cp ${./Cargo.lock} $out/Cargo.lock
'';
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
nativeBuildInputs = [ pkg-config ];
cargoSha256 = "1wrfly7c3an1mjqm7v13mlvx57hwlcxfjijkimicck04q6qdhbp6";
cargoBuildFlags = [ "-p" pname ];
meta = with lib; {
homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
license = licenses.asl20;
description = "Facilitating high-level interactions between wasm modules and JavaScript";
maintainers = with maintainers; [ ma27 rizary ];
platforms = platforms.unix;
};
}