Cleanup
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
f36efbc24b
commit
e220ecbb0a
|
@ -124,7 +124,7 @@ RCT_EXPORT_METHOD(initKeystore) {
|
|||
^(void)
|
||||
{
|
||||
NSString *res = StatusgoInitKeystore(keystoreDir.path);
|
||||
NSLog(@"StopNode result %@", res);
|
||||
NSLog(@"InitKeyStore result %@", res);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, stdenvNoCC, callPackage,status-go,
|
||||
{ config, lib, stdenvNoCC, callPackage, status-go,
|
||||
localMavenRepoBuilder, composeXcodeWrapper, mkShell, mergeSh }:
|
||||
|
||||
let
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
let
|
||||
shell = mkShell {
|
||||
shellHook = ''
|
||||
if [ -z "$RCTSTATUS_FILEPATH" ]; then
|
||||
echo "RCTSTATUS_FILEPATH is not defined! Aborting."
|
||||
if [ -z "$STATUS_GO_IOS_LIBDIR" ]; then
|
||||
echo "STATUS_GO_IOS_LIBDIR is not defined! Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -13,13 +13,13 @@ let
|
|||
|
||||
# Compare target folder with source to see if copying is required
|
||||
if [ -d "$RCTSTATUS_DIR/$targetBasename" ] && [ -d $STATUS_REACT_HOME/ios/Pods/ ] && \
|
||||
diff -q --no-dereference --recursive $RCTSTATUS_DIR/$targetBasename/ $RCTSTATUS_FILEPATH/ > /dev/null; then
|
||||
diff -q --no-dereference --recursive $RCTSTATUS_DIR/$targetBasename/ $STATUS_GO_IOS_LIBDIR/ > /dev/null; then
|
||||
echo "$RCTSTATUS_DIR/$targetBasename already in place"
|
||||
else
|
||||
sourceBasename="$(basename $RCTSTATUS_FILEPATH)"
|
||||
sourceBasename="$(basename $STATUS_GO_IOS_LIBDIR)"
|
||||
echo "Copying $sourceBasename from Nix store to $RCTSTATUS_DIR"
|
||||
rm -rf "$RCTSTATUS_DIR/$targetBasename/"
|
||||
cp -a $RCTSTATUS_FILEPATH $RCTSTATUS_DIR
|
||||
cp -a $STATUS_GO_IOS_LIBDIR $RCTSTATUS_DIR
|
||||
chmod -R 755 "$RCTSTATUS_DIR/$targetBasename"
|
||||
if [ "$sourceBasename" != "$targetBasename" ]; then
|
||||
mv "$RCTSTATUS_DIR/$sourceBasename" "$RCTSTATUS_DIR/$targetBasename"
|
||||
|
|
|
@ -51,8 +51,13 @@ if [[ "$TARGET" =~ (linux|windows|darwin|macos) ]]; then
|
|||
nix-shell ${shellArgs[@]} --run "scripts/prepare-for-desktop-platform.sh" || exit
|
||||
fi
|
||||
|
||||
statusGoConfig=''
|
||||
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
|
||||
shellArgs+=("--arg config {status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";}")
|
||||
statusGoConfig+="status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";"
|
||||
fi
|
||||
|
||||
if [ -n "$statusGoConfig" ]; then
|
||||
shellArgs+=("--arg config {$statusGoConfig}")
|
||||
fi
|
||||
|
||||
# if _NIX_ATTR is specified we shouldn't use shell.nix, the path will be different
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
let
|
||||
# everything else we define in nix/ dir
|
||||
targets = pkgs.callPackage ./targets.nix { };
|
||||
targets = pkgs.callPackage ./targets.nix { inherit config; };
|
||||
|
||||
# for calling lein targets in CI or Makefile
|
||||
leiningen-sh = pkgs.mkShell {
|
||||
|
|
|
@ -131,7 +131,7 @@ let
|
|||
inherit buildInputs;
|
||||
shellHook = ''
|
||||
# These variables are used by the iOS build preparation section in nix/mobile/ios/default.nix
|
||||
export RCTSTATUS_FILEPATH=${status-go-packages.ios}/lib/Statusgo.framework
|
||||
export STATUS_GO_IOS_LIBDIR=${status-go-packages.ios}/lib/Statusgo.framework
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,8 +6,13 @@ source "$_current_dir/lib/setup/path-support.sh"
|
|||
|
||||
source_lib "platform.sh"
|
||||
|
||||
statusGoConfig=''
|
||||
if [ -n "${STATUS_GO_SRC_OVERRIDE}" ]; then
|
||||
statusGoConfig+="status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";"
|
||||
fi
|
||||
|
||||
nixOpts=(
|
||||
"--arg config {status_go.src_override=\"${STATUS_GO_SRC_OVERRIDE}\";}"
|
||||
"--arg config {${statusGoConfig}}"
|
||||
"--arg env {BUILD_ENV=\"${BUILD_ENV}\";ANDROID_ABI_SPLIT=\"${ANDROID_ABI_SPLIT}\";ANDROID_ABI_INCLUDE=\"${ANDROID_ABI_INCLUDE}\";}"
|
||||
"--argstr build-type ${BUILD_TYPE}"
|
||||
"--argstr build-number ${BUILD_NUMBER}"
|
||||
|
|
Loading…
Reference in New Issue