status-mobile/nix/mobile/android/maven-and-npm-deps/maven/reactnative-android-native-deps.nix
Pedro Pombeiro 9feb31bd3b
Upgrade react-native to 0.60.5
- Use community net-info, react-native-webview instead of deprecated react-native classes
- Remove react-native-tcp
- Upgrade react-native libs (react-native-camera, react-native-firebase, react-native-mail, react-native-udp, react-native-webview-bridge)
- Do not include `:react-native-android` module explicitly
- Take advantage of RN AutoLinking
- nix: Update Gradle dependencies
2019-09-12 16:13:42 +02:00

49 lines
1.5 KiB
Nix

{ stdenvNoCC, fetchurl }:
let
# These versions should match node_modules/react-native/ReactAndroid/gradle.properties
react-native-deps-sources = [
rec {
name = "boost";
version = "1.63.0";
url = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${version}-0/${name}_${builtins.replaceStrings ["."] ["_"] version}.tar.gz";
sha256 = "1hq5h6wzcr3sk1kccfk769d59swwxy1kvfhqd6p7786a1zsavdr6";
}
rec {
name = "double-conversion";
version = "1.1.6";
url = "https://github.com/google/${name}/archive/v${version}.tar.gz";
sha256 = "0ynnckpyyhpwisb976knk9gr8jklfwr9flic8xj5flc8iv6hm1bb";
}
rec {
name = "folly";
version = "2018.10.22.00";
url = "https://github.com/facebook/${name}/archive/v${version}.tar.gz";
sha256 = "08cxc8hw34vnyyq45d04spy4dilrgqrv374lwxhg3sx60ww640y4";
}
rec {
name = "glog";
version = "0.3.5";
url = "https://github.com/google/${name}/archive/v${version}.tar.gz";
sha256 = "1q6ihk2asbx95a56kmyqwysq1x3grrw9jwqllafaidf0l84f903m";
}
];
in stdenvNoCC.mkDerivation {
name = "reactnative-android-native-deps";
srcs = builtins.map (d: (fetchurl { inherit (d) url sha256; })) react-native-deps-sources;
phases = [ "unpackPhase" ];
unpackPhase = ''
# Unpack all source archives.
mkdir -p $out/deps
cd $out/deps
for i in $srcs; do
unpackFile "$i"
done
cd ..
export sourceRoot=$out/deps
echo $sourceRoot
'';
}