Minor fixes in Nix
This commit is contained in:
parent
f5be5c3a69
commit
c18e2f8a09
4
deps.edn
4
deps.edn
|
@ -1,6 +1,6 @@
|
|||
{:paths ["components/src" "src" "react-native/src/cljsjs" "resources"]
|
||||
:deps {org.clojure/clojure {:mvn/version "1.9.0"} ;; Keep in sync with version from Nix
|
||||
org.clojure/clojurescript {:mvn/version "1.10.238"}
|
||||
:deps {org.clojure/clojure {:mvn/version "1.10.0"} ;; Keep in sync with version from Nix
|
||||
org.clojure/clojurescript {:mvn/version "1.10.520"}
|
||||
org.clojure/core.async {:mvn/version "0.4.474"}
|
||||
reagent {:mvn/version "0.7.0"
|
||||
:exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server cljsjs/create-react-class]}
|
||||
|
|
|
@ -8,9 +8,11 @@ let
|
|||
# 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)
|
||||
stdenv' = pkgs.stdenvNoCC;
|
||||
gradle = pkgs.gradle_4_10;
|
||||
go = pkgs.go_1_11;
|
||||
buildGoPackage = pkgs.buildGoPackage.override { inherit go; };
|
||||
statusDesktop = pkgs.callPackage ./nix/desktop { inherit target-os status-go pkgs; inherit (pkgs) darwin; stdenv = stdenv'; nodejs = nodejs'; };
|
||||
statusMobile = pkgs.callPackage ./nix/mobile { inherit target-os config pkgs status-go gradle; inherit (pkgs.xcodeenv) composeXcodeWrapper; stdenv = stdenv'; nodejs = nodejs'; };
|
||||
status-go = pkgs.callPackage ./nix/status-go { inherit target-os; inherit (pkgs.xcodeenv) composeXcodeWrapper; inherit (statusMobile) xcodewrapperArgs; androidPkgs = statusMobile.androidComposition; };
|
||||
status-go = pkgs.callPackage ./nix/status-go { inherit target-os go buildGoPackage; inherit (pkgs.xcodeenv) composeXcodeWrapper; inherit (statusMobile) xcodewrapperArgs; androidPkgs = statusMobile.androidComposition; };
|
||||
nodejs' = pkgs.nodejs-10_x;
|
||||
yarn' = pkgs.yarn.override { nodejs = nodejs'; };
|
||||
nodePkgBuildInputs = [
|
||||
|
|
|
@ -7,7 +7,7 @@ with stdenv;
|
|||
let
|
||||
platform = callPackage ../platform.nix { inherit target-os; };
|
||||
utils = callPackage ../utils.nix { inherit xcodeWrapper; };
|
||||
gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit composeXcodeWrapper xcodewrapperArgs utils; };
|
||||
gomobile = callPackage ./gomobile { inherit (androidPkgs) platform-tools; inherit buildGoPackage composeXcodeWrapper xcodewrapperArgs utils; };
|
||||
buildStatusGoDesktopLib = callPackage ./build-desktop-status-go.nix { inherit buildGoPackage go xcodeWrapper utils; };
|
||||
buildStatusGoMobileLib = callPackage ./build-mobile-status-go.nix { inherit buildGoPackage go gomobile xcodeWrapper utils; };
|
||||
extractStatusGoConfig = f: lib.last (lib.splitString "\n" (lib.fileContents f));
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euf
|
||||
|
||||
TARGET=${1:-debug}
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
. "$CURRENT_DIR/lib/setup/path-support.sh"
|
||||
source_lib "output.sh"
|
||||
source_lib "properties.sh"
|
||||
|
||||
cecho "Building @b@green[[${TARGET}]] environment"
|
||||
echo
|
||||
|
||||
GRADLE_PROPERTIES="--daemon --parallel -q -b android/build.gradle"
|
||||
|
||||
yarn install
|
||||
|
||||
case $TARGET in
|
||||
debug)
|
||||
lein do clean, cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleDebug
|
||||
echo "Generated android/app/build/outputs/apk/debug/app-debug.apk"
|
||||
exit 1
|
||||
;;
|
||||
release)
|
||||
STORE_FILE=$(property_gradle 'STATUS_RELEASE_STORE_FILE')
|
||||
[[ ! -e "${STORE_FILE/#\~/$HOME}" ]] && echo "Please generate keystore first using ./generate-keystore.sh" && exit 0
|
||||
lein do clean, with-profile prod cljsbuild once android && ./android/gradlew ${GRADLE_PROPERTIES} assembleRelease
|
||||
cecho "Generated @b@blueandroid/app/build/outputs/apk/release/app-release.apk"
|
||||
echo
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "Only debug and release targets are supported"
|
||||
exit 1
|
||||
esac
|
|
@ -15,4 +15,8 @@ if [ ! -z "$METRO_PID" ]; then
|
|||
[[ $term == 'y' ]] && kill $METRO_PID
|
||||
fi
|
||||
|
||||
react-native start --config packager/config.js
|
||||
if [ $TARGET_OS == 'ios' ] || [ $TARGET_OS == 'android' ]; then
|
||||
react-native start --config packager/config.js
|
||||
else
|
||||
react-native start
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue