nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 bzip2,
7 openssl,
8 zstd,
9}:
10
11rustPlatform.buildRustPackage rec {
12 pname = "boa";
13 version = "0.20";
14
15 src = fetchFromGitHub {
16 owner = "boa-dev";
17 repo = "boa";
18 tag = "v${version}";
19 hash = "sha256-foCIzzFoEpcE6i0QrSbiob3YHIOeTpjwpAMtcPGL8Vg=";
20 fetchSubmodules = true;
21 };
22
23 cargoHash = "sha256-PphgRSVCj724eYAC04Orpz/klYuAhphiQ3v5TRChs+w=";
24
25 cargoBuildFlags = [
26 "--package"
27 "boa_cli"
28 ];
29
30 nativeBuildInputs = [ pkg-config ];
31
32 buildInputs = [
33 bzip2
34 openssl
35 zstd
36 ];
37
38 env = {
39 ZSTD_SYS_USE_PKG_CONFIG = true;
40 };
41
42 meta = {
43 description = "Embeddable and experimental Javascript engine written in Rust";
44 mainProgram = "boa";
45 homepage = "https://github.com/boa-dev/boa";
46 changelog = "https://github.com/boa-dev/boa/blob/${src.rev}/CHANGELOG.md";
47 license = with lib.licenses; [
48 mit # or
49 unlicense
50 ];
51 maintainers = with lib.maintainers; [ dit7ya ];
52 };
53}