waagent: 2.11.1.12 -> 2.12.0.2 (#357728)
[NixPkgs.git] / pkgs / by-name / bo / boa / package.nix
blob9f695ff7d7939ae0382cc156e6d79aa64dee7648
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , fetchpatch
5 , pkg-config
6 , bzip2
7 , openssl
8 , zstd
9 , stdenv
10 , darwin
13 rustPlatform.buildRustPackage rec {
14   pname = "boa";
15   version = "0.17.3";
17   src = fetchFromGitHub {
18     owner = "boa-dev";
19     repo = "boa";
20     rev = "v${version}";
21     hash = "sha256-ROzdOanfHNPwHXA0SzU2fpuBonbDbgDqH+ZgOjwK/tg=";
22     fetchSubmodules = true;
23   };
25   patches = [
26     (fetchpatch {
27       name = "fix-rust-1.71-lints.patch";
28       url = "https://github.com/boa-dev/boa/commit/93d05bda6864aa6ee67682d84bd4fc2108093ef5.patch";
29       hash = "sha256-hMp4/UBN5moGBSqf8BJV2nBwgV3cry9uC2fJmdT5hkQ=";
30     })
31   ];
33   cargoHash = "sha256-UIUXayJwTrWbLm1UKnIXy1Df8a7ZoBzdNm/uZ1+H+SQ=";
35   cargoBuildFlags = [ "--package" "boa_cli" ];
37   nativeBuildInputs = [ pkg-config ];
39   buildInputs =
40     [ bzip2 openssl zstd ]
41     ++ lib.optionals stdenv.hostPlatform.isDarwin [
42       darwin.apple_sdk.frameworks.CoreFoundation
43       darwin.apple_sdk.frameworks.Security
44     ];
46   env = { ZSTD_SYS_USE_PKG_CONFIG = true; };
48   meta = with lib; {
49     description = "Embeddable and experimental Javascript engine written in Rust";
50     mainProgram = "boa";
51     homepage = "https://github.com/boa-dev/boa";
52     changelog = "https://github.com/boa-dev/boa/blob/${src.rev}/CHANGELOG.md";
53     license = with licenses; [ mit /* or */ unlicense ];
54     maintainers = with maintainers; [ dit7ya ];
55   };