diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-07-13 23:20:04 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-07-13 23:21:06 +0000 |
commit | a42c1d6d62656dcf9bd85de620f2e200a5ad22d8 (patch) | |
tree | 7d481fea9872f62a034452612be17f4494159baa /nixpkgs/pkgs/development/web/deno/default.nix | |
parent | 55f69a6b0e53c1c4b3e0396937c53bf5662b5519 (diff) | |
parent | 9480bae337095fd24f61380bce3174fdfe926a00 (diff) | |
download | nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.gz nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.bz2 nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.lz nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.xz nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.zst nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.zip |
Merge commit '9480bae337095fd24f61380bce3174fdfe926a00'
This is the last nixos-unstable release before 13b2903169f, which I'm a bit nervous about. So I want the update including that one to be as small as possible, hence going to this one first.
Diffstat (limited to 'nixpkgs/pkgs/development/web/deno/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/web/deno/default.nix | 98 |
1 files changed, 21 insertions, 77 deletions
diff --git a/nixpkgs/pkgs/development/web/deno/default.nix b/nixpkgs/pkgs/development/web/deno/default.nix index 629c1eeb41a1..199d7f81fe0f 100644 --- a/nixpkgs/pkgs/development/web/deno/default.nix +++ b/nixpkgs/pkgs/development/web/deno/default.nix @@ -3,52 +3,34 @@ , fetchFromGitHub , rust , rustPlatform -, python27 , installShellFiles , Security , CoreServices }: let + deps = import ./deps.nix { }; + arch = rust.toRustTarget stdenv.hostPlatform; + rustyV8Lib = with deps.rustyV8Lib; fetchurl { + url = "https://github.com/denoland/rusty_v8/releases/download/v${version}/librusty_v8_release_${arch}.a"; + sha256 = sha256s."${stdenv.hostPlatform.system}"; + meta = { inherit version; }; + }; +in +rustPlatform.buildRustPackage rec { pname = "deno"; - version = "1.0.0"; + version = "1.1.0"; - denoSrc = fetchFromGitHub { + src = fetchFromGitHub { owner = "denoland"; repo = pname; rev = "v${version}"; - sha256 = "0k8mqy1hf9hkp60jhd0x4z814y36g51083b3r7prc69ih2523hd1"; - + sha256 = "11rxfnjam1kr8piiw0s4r0qg8rj4qfpppp6dixk1hhsq2iwbnzj6"; fetchSubmodules = true; }; - cargoSha256 = "1fjl07qqvl1f20qazcqxh32xmdfh80jni7i3jzvz6vgsfw1g5cmk"; - - rustyV8Lib = fetchlib "rusty_v8" "0.4.2" { - x86_64-linux = "1ac6kv3kv087df6kdgfd7kbh24187cg9z7xhbz6rw6jjv4ci2zbi"; - aarch64-linux = "06iyjx4p4vp2i81wdy0vxai2k18pki972ff7k0scjqrgmnav1p8k"; - x86_64-darwin = "02hwbpsqdzb9mvfndgykvv44f1jig3w3a26l0h26hs5shsrp47jv"; - }; - - arch = rust.toRustTarget stdenv.hostPlatform; - fetchlib = name: version: sha256: fetchurl { - url = "https://github.com/denoland/${name}/releases/download/v${version}/librusty_v8_release_${arch}.a"; - sha256 = sha256."${stdenv.hostPlatform.system}"; - meta = { inherit version; }; - }; -in -rustPlatform.buildRustPackage rec { - inherit pname version cargoSha256; - - src = denoSrc; + cargoSha256 = "107i9zvlwiwad58c7lmh6zl9iwlqn1h8qk7zf7x68b6498p8nh7d"; - nativeBuildInputs = [ - # chromium/V8 requires python 2.7, we're not building V8 from source - # but as a result rusty_v8's download script also uses python 2.7 - # tracking issue: https://bugs.chromium.org/p/chromium/issues/detail?id=942720 - python27 - - # Install completions post-install - installShellFiles - ]; + # Install completions post-install + nativeBuildInputs = [ installShellFiles ]; buildInputs = with stdenv.lib; [ ] ++ optionals stdenv.isDarwin [ Security CoreServices ]; @@ -56,16 +38,6 @@ rustPlatform.buildRustPackage rec { # The rusty_v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem # To avoid this we pre-download the file and place it in the locations it will require it in advance preBuild = '' - # Check the rusty_v8 lib downloaded matches the Cargo.lock file - rusty_v8_ver="$(grep 'name = "rusty_v8"' -A 1 Cargo.lock | grep "version =" | cut -d\" -f2)" - if [ "${rustyV8Lib.meta.version}" != "$rusty_v8_ver" ]; then - printf "%s\n" >&2 \ - "version mismatch between 'rusty_v8' in Cargo.lock and downloaded library:" \ - " wanted: ${rustyV8Lib.meta.version}" \ - " got: $rusty_v8_ver" - exit 1 - fi; - _rusty_v8_setup() { for v in "$@"; do dir="target/$v/gn_out/obj" @@ -77,40 +49,9 @@ rustPlatform.buildRustPackage rec { _rusty_v8_setup "debug" "release" "${arch}/release" ''; - # Set home to existing env var TMP dir so tests that write there work correctly - preCheck = '' - export HOME="$TMPDIR" - ''; - - checkFlags = [ - # Strace not allowed on hydra - "--skip benchmark_test" - - # Tests that try to write to `/build/source/target/debug` - "--skip _017_import_redirect" - "--skip https_import" - "--skip js_unit_tests" - "--skip lock_write_fetch" - - # Cargo test runs a deno test on the std lib with sub-benchmarking-tests, - # The sub-sub-tests that are failing: - # forAwaitFetchDenolandX10, promiseAllFetchDenolandX10is - # Trying to access https://deno.land/ on build's limited network access - "--skip std_tests" - - # Fails on aarch64 machines - # tracking issue: https://github.com/denoland/deno/issues/5324 - "--skip run_v8_flags" - - # Skip for multiple reasons: - # downloads x86_64 binary on aarch64 machines - # tracking issue: https://github.com/denoland/deno/pull/5402 - # downloads a binary that needs ELF patching & tries to run imediately - # upgrade will likely never work with nix as it tries to replace itself - # code: https://github.com/denoland/deno/blob/v1.0.0/cli/upgrade.rs#L211 - "--skip upgrade_in_tmpdir" - "--skip upgrade_with_version_in_tmpdir" - ]; + # Tests have some inconsistencies between runs with output integration tests + # Skipping until resolved + doCheck = false; # TODO: Move to enhanced installShellCompletion when merged: PR #83630 postInstall = '' @@ -120,8 +61,11 @@ rustPlatform.buildRustPackage rec { installShellCompletion deno.{bash,fish} --zsh _deno ''; + passthru.updateScript = ./update/update.ts; + meta = with stdenv.lib; { homepage = "https://deno.land/"; + changelog = "${src.meta.homepage}/releases/tag/v${version}"; description = "A secure runtime for JavaScript and TypeScript"; longDescription = '' Deno aims to be a productive and secure scripting environment for the modern programmer. |