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:
parent
de4e73a256
commit
5380fcd68f
|
@ -7,7 +7,7 @@
|
||||||
let
|
let
|
||||||
androidComposition = androidenv.composeAndroidPackages {
|
androidComposition = androidenv.composeAndroidPackages {
|
||||||
toolsVersion = "26.1.1";
|
toolsVersion = "26.1.1";
|
||||||
platformToolsVersion = "29.0.5";
|
platformToolsVersion = "29.0.6";
|
||||||
buildToolsVersions = [ "29.0.2" ];
|
buildToolsVersions = [ "29.0.2" ];
|
||||||
includeEmulator = false;
|
includeEmulator = false;
|
||||||
platformVersions = [ "29" ];
|
platformVersions = [ "29" ];
|
||||||
|
|
|
@ -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 }:
|
status-go, localMavenRepoBuilder, projectNodePackage }:
|
||||||
|
|
||||||
let
|
let
|
||||||
gradle = callPackage ./gradle.nix { };
|
gradle = gradle_5; # Currently 5.6.4
|
||||||
androidEnv = callPackage ./android-env.nix { };
|
androidEnv = callPackage ./android-env.nix { };
|
||||||
leinProjectDeps = import ../../lein/lein-project-deps.nix { };
|
leinProjectDeps = import ../../lein/lein-project-deps.nix { };
|
||||||
|
|
||||||
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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,
|
# Patch the Go compiler so that we can have a say (using a NIX_GOWORKDIR env variable)
|
||||||
# since that directory path ends up in the string table and .gnu.version_d ELF header
|
# 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 }:
|
{ baseGo }:
|
||||||
|
|
23
nix/pkgs.nix
23
nix/pkgs.nix
|
@ -3,19 +3,26 @@
|
||||||
{ config ? { } }:
|
{ config ? { } }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (import <nixpkgs> { }) fetchFromGitHub;
|
inherit (import <nixpkgs> { }) fetchFromGitHub lib;
|
||||||
nixpkgsSrc = {
|
|
||||||
|
# For testing local version of nixpkgs
|
||||||
|
#nixpkgsSrc = (import <nixpkgs> { }).lib.cleanSource "/home/jakubgs/work/nixpkgs";
|
||||||
|
|
||||||
|
nixpkgsSrc = fetchFromGitHub {
|
||||||
name = "nixpkgs-source";
|
name = "nixpkgs-source";
|
||||||
owner = "status-im";
|
owner = "status-im";
|
||||||
repo = "nixpkgs";
|
repo = "nixpkgs";
|
||||||
rev = "6b866d0e1aa66962a63fceb99210276696e5cccc";
|
rev = "6dacca5eb43a8bfb02fb09331df607d4465a28e9";
|
||||||
sha256 = "0507cbrvp7m36z86kbgh617cc96j8jk74kvjflxsjz2f196z070p";
|
sha256 = "0whwzll9lvrq4gg5j838skg7fqpvb55w4z7y44pzib32k613y2qn";
|
||||||
# To get the compressed Nix sha256, use:
|
# To get the compressed Nix sha256, use:
|
||||||
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
|
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
|
||||||
# The last line will be the hash.
|
# The last line will be the hash.
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultConfig = {
|
defaultConfig = {
|
||||||
android_sdk.accept_license = true;
|
android_sdk.accept_license = true;
|
||||||
|
# Android Env still needs old OpenSSL
|
||||||
|
permittedInsecurePackages = [ "openssl-1.0.2u" ];
|
||||||
# Override some package versions
|
# Override some package versions
|
||||||
packageOverrides = pkgs: rec {
|
packageOverrides = pkgs: rec {
|
||||||
# utilities
|
# utilities
|
||||||
|
@ -24,15 +31,15 @@ let
|
||||||
mergeSh = import ./tools/mergeSh.nix { inherit (pkgs.stdenv) lib; };
|
mergeSh = import ./tools/mergeSh.nix { inherit (pkgs.stdenv) lib; };
|
||||||
|
|
||||||
# custom packages
|
# custom packages
|
||||||
|
openjdk = pkgs.openjdk8_headless;
|
||||||
nodejs = pkgs.nodejs-10_x;
|
nodejs = pkgs.nodejs-10_x;
|
||||||
yarn = pkgs.yarn.override { inherit nodejs; };
|
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_14; };
|
||||||
go = pkgs.callPackage ./patched-go { baseGo = pkgs.go_1_13; };
|
|
||||||
|
|
||||||
# custom builders
|
# 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
|
in
|
||||||
pkgs
|
pkgs
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, stdenv, callPackage, mkShell, mergeSh, buildGoPackage, go,
|
{ config, stdenv, callPackage, mkShell, mergeSh,
|
||||||
fetchFromGitHub, mkFilter, openjdk, androidPkgs, xcodeWrapper }:
|
fetchFromGitHub, mkFilter, openjdk, androidPkgs, xcodeWrapper }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -10,10 +10,10 @@ let
|
||||||
envFlags = callPackage ../tools/envParser.nix { };
|
envFlags = callPackage ../tools/envParser.nix { };
|
||||||
enableNimbus = (attrByPath ["STATUS_GO_ENABLE_NIMBUS"] "0" envFlags) != "0";
|
enableNimbus = (attrByPath ["STATUS_GO_ENABLE_NIMBUS"] "0" envFlags) != "0";
|
||||||
utils = callPackage ./utils.nix { inherit xcodeWrapper; };
|
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 = { }; };
|
nimbus = if enableNimbus then callPackage ./nimbus { } else { wrappers-android = { }; };
|
||||||
buildStatusGoDesktopLib = callPackage ./build-desktop-status-go.nix { inherit buildGoPackage go xcodeWrapper utils; };
|
buildStatusGoDesktopLib = callPackage ./build-desktop-status-go.nix { inherit xcodeWrapper utils; };
|
||||||
buildStatusGoMobileLib = callPackage ./build-mobile-status-go.nix { inherit buildGoPackage go gomobile xcodeWrapper utils androidPkgs; };
|
buildStatusGoMobileLib = callPackage ./build-mobile-status-go.nix { inherit gomobile xcodeWrapper utils androidPkgs; };
|
||||||
srcData =
|
srcData =
|
||||||
# If config.status-im.status-go.src-override is defined, instruct Nix to use that path to build status-go
|
# 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 {
|
if (attrByPath ["status-im" "status-go" "src-override"] "" config) != "" then rec {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{ stdenv, callPackage, utils, fetchgit,
|
{ stdenv, callPackage, utils, fetchgit, buildGoPackage,
|
||||||
buildGoPackage, glibc, ncurses5, zlib, makeWrapper, patchelf,
|
ncurses5, zlib, makeWrapper, patchelf, platform-tools, xcodeWrapper
|
||||||
platform-tools, xcodeWrapper
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -8,12 +7,13 @@ let
|
||||||
inherit (stdenv.lib) optional optionalString strings;
|
inherit (stdenv.lib) optional optionalString strings;
|
||||||
in buildGoPackage rec {
|
in buildGoPackage rec {
|
||||||
pname = "gomobile";
|
pname = "gomobile";
|
||||||
version = "20190719-${strings.substring 0 7 rev}";
|
version = "20200329-${strings.substring 0 7 rev}";
|
||||||
rev = "d2bd2a29d028cb94031e5e81788b19b371d00eb8";
|
rev = "4c31acba000778d337c0e4f32091cc923b3363d2";
|
||||||
sha256 = "1nv6vvhnjr01nx9y06q46ww87dppdwpbqrlsfg1xf2587wxl8xiv";
|
sha256 = "0k42pn6fq886k9hn85wbgg4h4y1myj7niw0746sn50zfbrmy3s2c";
|
||||||
|
|
||||||
goPackagePath = "golang.org/x/mobile";
|
goPackagePath = "golang.org/x/mobile";
|
||||||
subPackages = [ "bind" "cmd/gobind" "cmd/gomobile" ];
|
subPackages = [ "bind" "cmd/gobind" "cmd/gomobile" ];
|
||||||
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ]
|
buildInputs = [ makeWrapper ]
|
||||||
++ optional isDarwin xcodeWrapper;
|
++ optional isDarwin xcodeWrapper;
|
||||||
|
@ -67,6 +67,7 @@ in buildGoPackage rec {
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
inherit rev sha256;
|
inherit rev sha256;
|
||||||
|
name = "gomobile";
|
||||||
url = "https://go.googlesource.com/mobile";
|
url = "https://go.googlesource.com/mobile";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in New Issue