upgrade Nix packages, and a lot of dependencies

Notable version upgrades:

- Go: 1.13.4 > 1.14.0
- GoMobile: 20190806 > 20200329
- NodeJS: 10.17.0 > 12.0.0
- Yarn: 1.19.1 > 1.22.4
- Gradle: 5.1.1 > 5.6.4
- OpenJDK: 1.8.0-222 > 8u242-b08
- Clojure: 1.10.0.411 > 1.10.1.507

OpenSSL is still stuck on 1.0.2u due to Android SDK.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-04-15 13:12:56 +02:00
parent de4e73a256
commit 5380fcd68f
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
8 changed files with 79 additions and 38 deletions

View File

@ -7,7 +7,7 @@
let
androidComposition = androidenv.composeAndroidPackages {
toolsVersion = "26.1.1";
platformToolsVersion = "29.0.5";
platformToolsVersion = "29.0.6";
buildToolsVersions = [ "29.0.2" ];
includeEmulator = false;
platformVersions = [ "29" ];

View File

@ -1,8 +1,8 @@
{ config, lib, callPackage, mkShell, mergeSh, androidenv, flock, lsof, openjdk,
{ config, lib, callPackage, mkShell, mergeSh, androidenv, flock, lsof, openjdk, gradle_5,
status-go, localMavenRepoBuilder, projectNodePackage }:
let
gradle = callPackage ./gradle.nix { };
gradle = gradle_5; # Currently 5.6.4
androidEnv = callPackage ./android-env.nix { };
leinProjectDeps = import ../../lein/lein-project-deps.nix { };

View File

@ -1,15 +0,0 @@
#
# This Nix expression returns our sanctioned version of Gradle
#
{ gradleGen, fetchurl }:
gradleGen.gradleGen rec {
name = "gradle-5.1.1";
nativeVersion = "0.14";
src = fetchurl {
url = "https://services.gradle.org/distributions/${name}-bin.zip";
sha256 = "16671jp5wdr3q6p91h6szkgcxg3mw9wpgp6hjygbimy50lv34ls9";
};
}

View File

@ -1,6 +1,7 @@
#
# Patch the Go compiler so that we can have a say (using a NIX_GOWORKDIR environment variable) as to the temporary directory it uses for linking,
# since that directory path ends up in the string table and .gnu.version_d ELF header
# Patch the Go compiler so that we can have a say (using a NIX_GOWORKDIR env variable)
# as to the temporary directory it uses for linking, since that directory path ends up
# in the string table and .gnu.version_d ELF header.
#
{ baseGo }:

View File

@ -3,19 +3,26 @@
{ config ? { } }:
let
inherit (import <nixpkgs> { }) fetchFromGitHub;
nixpkgsSrc = {
inherit (import <nixpkgs> { }) fetchFromGitHub lib;
# For testing local version of nixpkgs
#nixpkgsSrc = (import <nixpkgs> { }).lib.cleanSource "/home/jakubgs/work/nixpkgs";
nixpkgsSrc = fetchFromGitHub {
name = "nixpkgs-source";
owner = "status-im";
repo = "nixpkgs";
rev = "6b866d0e1aa66962a63fceb99210276696e5cccc";
sha256 = "0507cbrvp7m36z86kbgh617cc96j8jk74kvjflxsjz2f196z070p";
rev = "6dacca5eb43a8bfb02fb09331df607d4465a28e9";
sha256 = "0whwzll9lvrq4gg5j838skg7fqpvb55w4z7y44pzib32k613y2qn";
# To get the compressed Nix sha256, use:
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
# The last line will be the hash.
};
defaultConfig = {
android_sdk.accept_license = true;
# Android Env still needs old OpenSSL
permittedInsecurePackages = [ "openssl-1.0.2u" ];
# Override some package versions
packageOverrides = pkgs: rec {
# utilities
@ -24,15 +31,15 @@ let
mergeSh = import ./tools/mergeSh.nix { inherit (pkgs.stdenv) lib; };
# custom packages
openjdk = pkgs.openjdk8_headless;
nodejs = pkgs.nodejs-10_x;
yarn = pkgs.yarn.override { inherit nodejs; };
clojure = pkgs.clojure.overrideAttrs (old: rec { version = "1.10.0.411"; });
go = pkgs.callPackage ./patched-go { baseGo = pkgs.go_1_13; };
go = pkgs.callPackage ./patched-go { baseGo = pkgs.go_1_14; };
# custom builders
buildGoPackage = pkgs.buildGoPackage.override { inherit go; };
buildGoPackage = pkgs.buildGo114Package.override { inherit go; };
};
};
pkgs = (import (fetchFromGitHub nixpkgsSrc)) { config = defaultConfig // config; };
pkgs = (import nixpkgsSrc) { config = defaultConfig // config; };
in
pkgs

View File

@ -1,4 +1,4 @@
{ config, stdenv, callPackage, mkShell, mergeSh, buildGoPackage, go,
{ config, stdenv, callPackage, mkShell, mergeSh,
fetchFromGitHub, mkFilter, openjdk, androidPkgs, xcodeWrapper }:
let
@ -10,10 +10,10 @@ let
envFlags = callPackage ../tools/envParser.nix { };
enableNimbus = (attrByPath ["STATUS_GO_ENABLE_NIMBUS"] "0" envFlags) != "0";
utils = callPackage ./utils.nix { inherit xcodeWrapper; };
gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit xcodeWrapper utils buildGoPackage; };
gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit xcodeWrapper utils; };
nimbus = if enableNimbus then callPackage ./nimbus { } else { wrappers-android = { }; };
buildStatusGoDesktopLib = callPackage ./build-desktop-status-go.nix { inherit buildGoPackage go xcodeWrapper utils; };
buildStatusGoMobileLib = callPackage ./build-mobile-status-go.nix { inherit buildGoPackage go gomobile xcodeWrapper utils androidPkgs; };
buildStatusGoDesktopLib = callPackage ./build-desktop-status-go.nix { inherit xcodeWrapper utils; };
buildStatusGoMobileLib = callPackage ./build-mobile-status-go.nix { inherit gomobile xcodeWrapper utils androidPkgs; };
srcData =
# If config.status-im.status-go.src-override is defined, instruct Nix to use that path to build status-go
if (attrByPath ["status-im" "status-go" "src-override"] "" config) != "" then rec {

View File

@ -1,6 +1,5 @@
{ stdenv, callPackage, utils, fetchgit,
buildGoPackage, glibc, ncurses5, zlib, makeWrapper, patchelf,
platform-tools, xcodeWrapper
{ stdenv, callPackage, utils, fetchgit, buildGoPackage,
ncurses5, zlib, makeWrapper, patchelf, platform-tools, xcodeWrapper
}:
let
@ -8,12 +7,13 @@ let
inherit (stdenv.lib) optional optionalString strings;
in buildGoPackage rec {
pname = "gomobile";
version = "20190719-${strings.substring 0 7 rev}";
rev = "d2bd2a29d028cb94031e5e81788b19b371d00eb8";
sha256 = "1nv6vvhnjr01nx9y06q46ww87dppdwpbqrlsfg1xf2587wxl8xiv";
version = "20200329-${strings.substring 0 7 rev}";
rev = "4c31acba000778d337c0e4f32091cc923b3363d2";
sha256 = "0k42pn6fq886k9hn85wbgg4h4y1myj7niw0746sn50zfbrmy3s2c";
goPackagePath = "golang.org/x/mobile";
subPackages = [ "bind" "cmd/gobind" "cmd/gomobile" ];
goDeps = ./deps.nix;
buildInputs = [ makeWrapper ]
++ optional isDarwin xcodeWrapper;
@ -67,6 +67,7 @@ in buildGoPackage rec {
src = fetchgit {
inherit rev sha256;
name = "gomobile";
url = "https://go.googlesource.com/mobile";
};

View File

@ -0,0 +1,47 @@
[
{
goPackagePath = "golang.org/x/tools";
fetch = {
type = "git";
url = "https://go.googlesource.com/tools";
rev = "6edc0a871e69";
sha256 = "1nxrr7nin65cmsm6i3vxdc57n03v1i541hfllw0p4zw8f414wfll";
};
}
{
goPackagePath = "golang.org/x/mod";
fetch = {
type = "git";
url = "https://go.googlesource.com/mod";
rev = "331c550502dd";
sha256 = "0942gzs6mlsjal4drjmm8gr54pj1cdhsl9mnj3ygm200mf3fj6pi";
};
}
{
goPackagePath = "golang.org/x/exp";
fetch = {
type = "git";
url = "https://go.googlesource.com/exp";
rev = "ec7cb31e5a56";
sha256 = "19b4kdwfahq9f809v4lmn9h47sq1y67nkl7csnracn5qd334hp06";
};
}
{
goPackagePath = "golang.org/x/image";
fetch = {
type = "git";
url = "https://go.googlesource.com/image";
rev = "cff245a6509b";
sha256 = "0hiznlkiaay30acwvvyq8g6bm32r7bc6gv47pygrcxqpapasbz84";
};
}
{
goPackagePath = "golang.org/x/xerrors";
fetch = {
type = "git";
url = "https://go.googlesource.com/xerrors";
rev = "1b5146add8981d58be77b16229c0ff0f8bebd8c1";
sha256 = "0w2akj91krxjag0xdhsg78470888nicc5ismc2ap9jqpss6v1zih";
};
}
]