Skip to content

Commit

Permalink
fix_: add missing dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mendelskiv93 committed Oct 23, 2024
1 parent e783eaa commit 2ccf248
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ statusgo-cross: statusgo-android statusgo-ios
@echo "Full cross compilation done."
@ls -ld build/bin/statusgo-*

status-go-deps:
go install go.uber.org/mock/[email protected]
go install github.com/kevinburke/go-bindata/v4/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]

statusgo-android: generate
statusgo-android: ##@cross-compile Build status-go for Android
@echo "Building status-go for Android..."
Expand Down
18 changes: 16 additions & 2 deletions _assets/ci/Jenkinsfile.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pipeline {
TMPDIR = "${WORKSPACE_TMP}"
GOPATH = "${WORKSPACE_TMP}/go"
GOCACHE = "${WORKSPACE_TMP}/gocache"
PATH = "${PATH}:${GOPATH}/bin"
PATH = "${PATH}:${GOPATH}/bin:/c/Users/jenkins/go/bin"
REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go"
VERSION = sh(script: "./_assets/scripts/version.sh", returnStdout: true)
ARTIFACT = utils.pkgFilename(
Expand All @@ -66,7 +66,21 @@ pipeline {
}
}
}
/* Sanity-check C bindings */

stage('Deps') {
steps { script {
shell('make status-go-deps')
}
}
}

stage('Generate') {
steps { script {
shell('make generate')
}
}
}

stage('Build Static Lib') {
steps {
script {
Expand Down
14 changes: 6 additions & 8 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ let
inherit (pkgs) lib stdenv callPackage;
/* No Android SDK for Darwin aarch64. */
isMacM1 = stdenv.isDarwin && stdenv.isAarch64;
isMacIntel = stdenv.isDarwin && stdenv.isx86_64;

appleSdk11Stdenv = pkgs.overrideSDK pkgs.stdenv "11.0";
sdk11mkShell = pkgs.mkShell.override { stdenv = appleSdk11Stdenv; };
mkShell = if stdenv.isDarwin then sdk11mkShell else pkgs.mkShell;

/* Lock requires Xcode verison. */
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
Expand All @@ -18,19 +21,14 @@ let
withAndroidPkgs = !isMacM1;
};

in pkgs.mkShell {
in mkShell {
name = "status-go-shell";

buildInputs = with pkgs; [
git jq which
go golangci-lint go-junit-report gopls go-bindata gomobileMod codecov-cli go-generate-fast
mockgen protobuf3_20 protoc-gen-go gotestsum go-modvendor openjdk cc-test-reporter
] ++ lib.optionals (stdenv.isDarwin) [ xcodeWrapper ]
++ lib.optionals (isMacIntel) [
pkgs.darwin.apple_sdk.libs.xpc
pkgs.darwin.apple_sdk_11_0.frameworks.Security
pkgs.darwin.apple_sdk_11_0.frameworks.CoreServices
];
] ++ lib.optionals (stdenv.isDarwin) [ xcodeWrapper ];

shellHook = lib.optionalString (!isMacM1) ''
ANDROID_HOME=${pkgs.androidPkgs.androidsdk}/libexec/android-sdk
Expand Down

0 comments on commit 2ccf248

Please sign in to comment.