Ensure shell.nix uses same nixpkgs as the rest of the environment

also remove gradle wrapper

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Pedro Pombeiro 2019-06-19 11:54:14 +02:00 committed by Jakub Sokołowski
parent b6163b8ae5
commit fad5f318cf
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
6 changed files with 26 additions and 17 deletions

6
.watchmanconfig Normal file
View File

@ -0,0 +1,6 @@
{
"ignore_dirs": [
"android/build",
"target"
]
}

Binary file not shown.

View File

@ -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

View File

@ -1,16 +1,11 @@
# target-os = [ 'windows' 'linux' 'macos' 'darwin' 'android' 'ios' 'all' ] # target-os = [ 'windows' 'linux' 'macos' 'darwin' 'android' 'ios' 'all' ]
{ config ? { android_sdk.accept_license = true; }, { config ? null,
pkgs ? import ((import <nixpkgs> { }).fetchFromGitHub { nixpkgs-bootstrap ? import ./nix/nixpkgs-bootstrap.nix { inherit config; },
owner = "status-im"; pkgs ? nixpkgs-bootstrap.pkgs,
repo = "nixpkgs";
rev = "db492b61572251c2866f6b5e6e94e9d70e7d3021";
sha256 = "188r7gbcrxi20nj6xh9bmdf3lbjwb94v9s0wpacl7q39g1fca66h";
name = "nixpkgs-source";
}) { inherit config; },
stdenv ? pkgs.stdenv, stdenv ? pkgs.stdenv,
target-os ? "all" }: 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; src = null;
# TODO: Figure out if there's a better way to do this # 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 :-/ # 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 :-/

13
nix/nixpkgs-bootstrap.nix Normal file
View File

@ -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 <nixpkgs> { }).fetchFromGitHub {
owner = "status-im";
repo = "nixpkgs";
rev = "db492b61572251c2866f6b5e6e94e9d70e7d3021";
sha256 = "188r7gbcrxi20nj6xh9bmdf3lbjwb94v9s0wpacl7q39g1fca66h";
name = "nixpkgs-source";
})) { inherit config; } }:
{
inherit pkgs config;
}

View File

@ -1,9 +1,10 @@
{ pkgs ? import <nixpkgs> {}, { nixpkgs-bootstrap ? import ./nix/nixpkgs-bootstrap.nix { },
pkgs ? nixpkgs-bootstrap.pkgs,
target-os ? "all" }: target-os ? "all" }:
with pkgs; with pkgs;
let 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; }; platform = callPackage ./nix/platform.nix { inherit target-os; };
useFastlanePkg = (platform.targetAndroid && !stdenv'.isDarwin); 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) # 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)