diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000000..be5ad0c473 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1,6 @@ +{ + "ignore_dirs": [ + "android/build", + "target" + ] +} \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 01b8bf6b1f..0000000000 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 16c483e36d..0000000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Sun Jan 22 10:12:39 EET 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip diff --git a/default.nix b/default.nix index 3877d74cf4..dac19f2ec6 100644 --- a/default.nix +++ b/default.nix @@ -1,16 +1,11 @@ # target-os = [ 'windows' 'linux' 'macos' 'darwin' 'android' 'ios' 'all' ] -{ config ? { android_sdk.accept_license = true; }, - pkgs ? import ((import { }).fetchFromGitHub { - owner = "status-im"; - repo = "nixpkgs"; - rev = "db492b61572251c2866f6b5e6e94e9d70e7d3021"; - sha256 = "188r7gbcrxi20nj6xh9bmdf3lbjwb94v9s0wpacl7q39g1fca66h"; - name = "nixpkgs-source"; - }) { inherit config; }, +{ config ? null, + nixpkgs-bootstrap ? import ./nix/nixpkgs-bootstrap.nix { inherit config; }, + pkgs ? nixpkgs-bootstrap.pkgs, stdenv ? pkgs.stdenv, target-os ? "all" }: -(pkgs.callPackage ./derivation.nix { inherit pkgs target-os config; }).overrideAttrs(_: { +(pkgs.callPackage ./derivation.nix { inherit pkgs target-os; inherit (nixpkgs-bootstrap) config; }).overrideAttrs(_: { src = null; # TODO: Figure out if there's a better way to do this # NOTE: There's a weird difference in behavior between Linux and macOS: in Linux the packages will only be fetched by `nix build` if unpackPhase exists. In macOS it's the other way around :-/ diff --git a/nix/nixpkgs-bootstrap.nix b/nix/nixpkgs-bootstrap.nix new file mode 100644 index 0000000000..5b1723a5e0 --- /dev/null +++ b/nix/nixpkgs-bootstrap.nix @@ -0,0 +1,13 @@ +# This file controls the pinned version of nixpkgs we use for our Nix environment +{ config ? { android_sdk.accept_license = true; }, + pkgs ? (import ((import { }).fetchFromGitHub { + owner = "status-im"; + repo = "nixpkgs"; + rev = "db492b61572251c2866f6b5e6e94e9d70e7d3021"; + sha256 = "188r7gbcrxi20nj6xh9bmdf3lbjwb94v9s0wpacl7q39g1fca66h"; + name = "nixpkgs-source"; + })) { inherit config; } }: + +{ + inherit pkgs config; +} \ No newline at end of file diff --git a/shell.nix b/shell.nix index b739a96c9b..ce7f4c9709 100644 --- a/shell.nix +++ b/shell.nix @@ -1,9 +1,10 @@ -{ pkgs ? import {}, +{ nixpkgs-bootstrap ? import ./nix/nixpkgs-bootstrap.nix { }, + pkgs ? nixpkgs-bootstrap.pkgs, target-os ? "all" }: with pkgs; let - projectDeps = import ./default.nix { inherit target-os; }; + projectDeps = import ./default.nix { inherit target-os pkgs nixpkgs-bootstrap; inherit (nixpkgs-bootstrap) config; }; platform = callPackage ./nix/platform.nix { inherit target-os; }; useFastlanePkg = (platform.targetAndroid && !stdenv'.isDarwin); # TODO: Try to use stdenv for iOS. The problem is with building iOS as the build is trying to pass parameters to Apple's ld that are meant for GNU's ld (e.g. -dynamiclib)