Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49096 from andir/18.03/firefox
[18.03] firefox{,-bin}: 62.0.3 -> 63.0 & nss: 3.38-> 3.39
- Loading branch information
Showing
13 changed files
with
1,040 additions
and
405 deletions.
There are no files selected for viewing
794 changes: 397 additions & 397 deletions
794
pkgs/applications/networking/browsers/firefox-bin/release_sources.nix
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ stdenv, makeWrapper, bash, buildRustPackage, curl, darwin | ||
, version | ||
, src | ||
, platform | ||
, versionType | ||
}: | ||
|
||
let | ||
inherit (stdenv.lib) optionalString; | ||
inherit (darwin.apple_sdk.frameworks) Security; | ||
|
||
bootstrapping = versionType == "bootstrap"; | ||
|
||
installComponents | ||
= "rustc,rust-std-${platform}" | ||
+ (optionalString bootstrapping ",cargo") | ||
; | ||
in | ||
|
||
rec { | ||
inherit buildRustPackage; | ||
|
||
rustc = stdenv.mkDerivation rec { | ||
name = "rustc-${versionType}-${version}"; | ||
|
||
inherit version; | ||
inherit src; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = http://www.rust-lang.org/; | ||
description = "A safe, concurrent, practical language"; | ||
maintainers = with maintainers; [ qknight ]; | ||
license = [ licenses.mit licenses.asl20 ]; | ||
}; | ||
|
||
buildInputs = [ bash ] ++ stdenv.lib.optional stdenv.isDarwin Security; | ||
|
||
postPatch = '' | ||
patchShebangs . | ||
''; | ||
|
||
installPhase = '' | ||
./install.sh --prefix=$out \ | ||
--components=${installComponents} | ||
${optionalString (stdenv.isLinux && bootstrapping) '' | ||
patchelf \ | ||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | ||
"$out/bin/rustc" | ||
patchelf \ | ||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | ||
"$out/bin/rustdoc" | ||
patchelf \ | ||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | ||
"$out/bin/cargo" | ||
''} | ||
${optionalString (stdenv.isDarwin && bootstrapping) '' | ||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/rustc" | ||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/rustdoc" | ||
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo" | ||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo" | ||
install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" | ||
for f in $out/lib/lib*.dylib; do | ||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$f" | ||
done | ||
''} | ||
# Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc | ||
# (or similar) here. It causes strange effects where rustc loads | ||
# the wrong libraries in a bootstrap-build causing failures that | ||
# are very hard to track down. For details, see | ||
# https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943 | ||
''; | ||
}; | ||
|
||
cargo = stdenv.mkDerivation rec { | ||
name = "cargo-${versionType}-${version}"; | ||
|
||
inherit version; | ||
inherit src; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = http://www.rust-lang.org/; | ||
description = "A safe, concurrent, practical language"; | ||
maintainers = with maintainers; [ qknight ]; | ||
license = [ licenses.mit licenses.asl20 ]; | ||
}; | ||
|
||
buildInputs = [ makeWrapper bash ] ++ stdenv.lib.optional stdenv.isDarwin Security; | ||
|
||
postPatch = '' | ||
patchShebangs . | ||
''; | ||
|
||
installPhase = '' | ||
patchShebangs ./install.sh | ||
./install.sh --prefix=$out \ | ||
--components=cargo | ||
${optionalString (stdenv.isLinux && bootstrapping) '' | ||
patchelf \ | ||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | ||
"$out/bin/cargo" | ||
''} | ||
${optionalString (stdenv.isDarwin && bootstrapping) '' | ||
install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo" | ||
install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo" | ||
install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" | ||
''} | ||
wrapProgram "$out/bin/cargo" \ | ||
--suffix PATH : "${rustc}/bin" | ||
''; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ stdenv, fetchurl, callPackage }: | ||
|
||
let | ||
# Note: the version MUST be one version prior to the version we're | ||
# building | ||
version = "1.28.0"; | ||
|
||
# fetch hashes by running `print-hashes.sh 1.24.1` | ||
hashes = { | ||
i686-unknown-linux-gnu = "de7cdb4e665e897ea9b10bf6fd545f900683296456d6a11d8510397bb330455f"; | ||
x86_64-unknown-linux-gnu = "2a1390340db1d24a9498036884e6b2748e9b4b057fc5219694e298bdaa37b810"; | ||
armv7-unknown-linux-gnueabihf = "346558d14050853b87049e5e1fbfae0bf0360a2f7c57433c6985b1a879c349a2"; | ||
aarch64-unknown-linux-gnu = "9b6fbcee73070332c811c0ddff399fa31965bec62ef258656c0c90354f6231c1"; | ||
i686-apple-darwin = "752e2c9182e057c4a54152d1e0b3949482c225d02bb69d9d9a4127dc2a65fb68"; | ||
x86_64-apple-darwin = "5d7a70ed4701fe9410041c1eea025c95cad97e5b3d8acc46426f9ac4f9f02393"; | ||
}; | ||
|
||
platform = | ||
if stdenv.hostPlatform.system == "i686-linux" | ||
then "i686-unknown-linux-gnu" | ||
else if stdenv.hostPlatform.system == "x86_64-linux" | ||
then "x86_64-unknown-linux-gnu" | ||
else if stdenv.hostPlatform.system == "armv7l-linux" | ||
then "armv7-unknown-linux-gnueabihf" | ||
else if stdenv.hostPlatform.system == "aarch64-linux" | ||
then "aarch64-unknown-linux-gnu" | ||
else if stdenv.hostPlatform.system == "i686-darwin" | ||
then "i686-apple-darwin" | ||
else if stdenv.hostPlatform.system == "x86_64-darwin" | ||
then "x86_64-apple-darwin" | ||
else throw "missing bootstrap url for platform ${stdenv.hostPlatform.system}"; | ||
|
||
src = fetchurl { | ||
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz"; | ||
sha256 = hashes."${platform}"; | ||
}; | ||
|
||
in callPackage ./binaryBuild.nix | ||
{ inherit version src platform; | ||
buildRustPackage = null; | ||
versionType = "bootstrap"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ stdenv, file, curl, pkgconfig, python, openssl, cmake, zlib | ||
, makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2, darwin | ||
, version | ||
, patches ? [] | ||
, src }: | ||
|
||
let | ||
inherit (darwin.apple_sdk.frameworks) CoreFoundation; | ||
in | ||
|
||
rustPlatform.buildRustPackage rec { | ||
name = "cargo-${version}"; | ||
inherit version src patches; | ||
|
||
# the rust source tarball already has all the dependencies vendored, no need to fetch them again | ||
cargoVendorDir = "src/vendor"; | ||
preBuild = "cd src; pushd tools/cargo"; | ||
postBuild = "popd"; | ||
|
||
passthru.rustc = rustc; | ||
|
||
# changes hash of vendor directory otherwise | ||
dontUpdateAutotoolsGnuConfigScripts = true; | ||
|
||
nativeBuildInputs = [ pkgconfig ]; | ||
buildInputs = [ cacert file curl python openssl cmake zlib makeWrapper libgit2 ] | ||
++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation libiconv ]; | ||
|
||
LIBGIT2_SYS_USE_PKG_CONFIG=1; | ||
|
||
# fixes: the cargo feature `edition` requires a nightly version of Cargo, but this is the `stable` channel | ||
RUSTC_BOOTSTRAP=1; | ||
|
||
# FIXME: Use impure version of CoreFoundation because of missing symbols. | ||
# CFURLSetResourcePropertyForKey is defined in the headers but there's no | ||
# corresponding implementation in the sources from opensource.apple.com. | ||
preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' | ||
export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE" | ||
''; | ||
|
||
postInstall = '' | ||
# NOTE: We override the `http.cainfo` option usually specified in | ||
# `.cargo/config`. This is an issue when users want to specify | ||
# their own certificate chain as environment variables take | ||
# precedence | ||
wrapProgram "$out/bin/cargo" \ | ||
--suffix PATH : "${rustc}/bin" \ | ||
--set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \ | ||
--set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt" | ||
''; | ||
|
||
checkPhase = '' | ||
# Disable cross compilation tests | ||
export CFG_DISABLE_CROSS_TESTS=1 | ||
cargo test | ||
''; | ||
|
||
# Disable check phase as there are failures (4 tests fail) | ||
doCheck = false; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://crates.io; | ||
description = "Downloads your Rust project's dependencies and builds your project"; | ||
maintainers = with maintainers; [ wizeman retrry ]; | ||
license = [ licenses.mit licenses.asl20 ]; | ||
platforms = platforms.unix; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ stdenv, callPackage, recurseIntoAttrs, makeRustPlatform, llvm, fetchurl | ||
, targets ? [] | ||
, targetToolchains ? [] | ||
, targetPatches ? [] | ||
}: | ||
|
||
let | ||
rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {})); | ||
version = "1.29.1"; | ||
cargoVersion = "1.29.1"; | ||
src = fetchurl { | ||
url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; | ||
sha256 = "0jd3c57x3yndizns4pb68nh25si47agfmrdvf9nwwsyfcs5p5c7i"; | ||
}; | ||
in rec { | ||
rustc = callPackage ./rustc.nix { | ||
inherit stdenv llvm targets targetPatches targetToolchains rustPlatform version src; | ||
|
||
patches = [ | ||
./patches/net-tcp-disable-tests.patch | ||
|
||
# Re-evaluate if this we need to disable this one | ||
#./patches/stdsimd-disable-doctest.patch | ||
|
||
# Fails on hydra - not locally; the exact reason is unknown. | ||
# Comments in the test suggest that some non-reproducible environment | ||
# variables such $RANDOM can make it fail. | ||
./patches/disable-test-inherit-env.patch | ||
]; | ||
|
||
forceBundledLLVM = true; | ||
|
||
configureFlags = [ "--release-channel=stable" ]; | ||
|
||
# 1. Upstream is not running tests on aarch64: | ||
# see https://github.com/rust-lang/rust/issues/49807#issuecomment-380860567 | ||
# So we do the same. | ||
# 2. Tests run out of memory for i686 | ||
#doCheck = !stdenv.isAarch64 && !stdenv.isi686; | ||
|
||
# Disabled for now; see https://github.com/NixOS/nixpkgs/pull/42348#issuecomment-402115598. | ||
doCheck = false; | ||
}; | ||
|
||
cargo = callPackage ./cargo.nix rec { | ||
version = cargoVersion; | ||
inherit src; | ||
inherit stdenv; | ||
inherit rustc; # the rustc that will be wrapped by cargo | ||
inherit rustPlatform; # used to build cargo | ||
}; | ||
} |
10 changes: 10 additions & 0 deletions
10
pkgs/development/compilers/rust/1.29/patches/disable-test-inherit-env.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- rustc-1.26.2-src.org/src/libstd/process.rs 2018-06-01 21:40:11.000000000 +0100 | ||
+++ rustc-1.26.2-src/src/libstd/process.rs 2018-06-08 07:50:23.023828658 +0100 | ||
@@ -1745,6 +1745,7 @@ | ||
} | ||
|
||
#[test] | ||
+ #[ignore] | ||
fn test_inherit_env() { | ||
use env; | ||
|
Oops, something went wrong.