Commit Graph

14 Commits

Author SHA1 Message Date
Jakub Sokołowski c57974d9ff
nix: upgrade go-maven-resolver to v1.1.0
This release adds support for resolving transitive dependencies.
https://github.com/status-im/go-maven-resolver/releases/tag/v1.1.0
https://github.com/status-im/go-maven-resolver/pull/5

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-02 16:29:19 +01:00
Jakub Sokołowski 939ce8bef5
nix: Upgrade Android SDK, use nixpkgs master
This makes use of the refactoring of Android SDK done in:
https://github.com/NixOS/nixpkgs/pull/89775

Which allows us to drop the use of our own fork of `nixpkgs`.

Android Upgrades:
* Build Tools - `29.0.2` to `30.0.3`
* Platform Tools - `29.0.6` to `30.0.5`
* NDK Bundle - `21.0.6113669` to `21.3.6528147`

Other Upgrades:
* Git - `2.28.0` to `2.29.2`
* Go - `1.14.7` to `1.14.13`
* Clojure - `1.10.1.645` to `1.10.1.763`
* NodeJS - `12.18.3` to `12.20.1`
* Yarn - `1.22.4` to `1.22.10`
* OpenJDK - `8u265-ga` to `8u272-b10`
* PatchElf - `0.11` to `0.12`
* CoreUtils - `8.31` to `8.32`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-01-13 15:35:59 +01:00
Jakub Sokołowski eac77f84c2
nix: upgrade nixpkgs
Significant updates:
- Git: `2.25.1` to `2.28.0`
- Make: `4.2.1` to `4.3`
- Glibc: `2.30` to `2.31`
- PatchElf: `0.9` to `0.11`
- GoLang: `1.14.0` to `1.14.7`
- NodeJS: `v12.16.2` to `v12.18.3`
- Clojure: `1.10.1.507` to `1.10.1.645`
- OpenJDK: `8u242-b08` to `8u265-ga`
- GoMobile: `20200329` to `20200622`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-02 18:06:23 +02:00
Jakub Sokołowski 2161192e76
nix: simplify build of gomobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 14:28:15 +02:00
Jakub Sokołowski 933c0f8f8c
nix: allow XCode versions 11.5 and higher
This is kinda hacky, but is simple enough since the version check uses grep.

For details see:
https://github.com/status-im/nixpkgs/blob/status-mods/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-31 13:04:47 +02:00
Jakub Sokołowski 112132aa94
drop all desktop related files and references
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-08 10:26:51 +02:00
Jakub Sokołowski 98280dc45b
make go-maven-resolver fail when any resolution fails
Before errors like this:
```
finder.go:91: error: 'no pom data' for: <Dep ID=com.afollestad.material-dialogs:commons:0.9.6.0 O=false S= >
```
Would be printed to `stderr` but exit code would not be non-zero.

Now the whole `make nix-update-gradle` target should fail if any
dependency resolution fails.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-18 12:10:08 +02:00
Jakub Sokołowski 2f65cedd2d
nix: replace grep and sed with AWK for parsing Gradle deps
The mess with regexes is hard to read and think about which is why it
had bugs with handling some Gradle formats.

It also lowers further the number of dependencies pulled from 785 to 744.

Changes:
- Added `gradle_parser.awk` script for getting dependencies from Gradle
- Changed the `deps.urls` file to contain full URLs to POMs
- Dropped the `deps.urls.old` part since `get_urls.sh` no longer exists
- Added `CLR` for learing line to `scripts/colors.sh`
- Wrote a new `nix/deps/gradle/README.md`
- Re-generated `nix/pkgs/go-maven-resolver/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-25 19:34:56 +02:00
Jakub Sokołowski d0216674da
nix: use go-maven-resolver to fix nix-update-gradle
This Go package was implemented by me to avoid having to use Mavan or
Gradle to resolve all the dependencies for Nix:
https://github.com/status-im/go-maven-resolver

The Go tool is essentially a slightly smarter and more efficient version
of the `get_urls.sh` script, which was mostly slow due to the `mvn
dependency:list` calls and slow HTTP requests.

This takes down the `make nix-update-gradle` target to under 2 minutes
on my machine.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-24 18:08:05 +02:00
Jakub Sokołowski 0bec573eb3
nix: don't use gradle to patch node modules
Before in order to create `deps.nodejs-patched` the `deps.gradle` would
also have to be downloaded in order to patch `build.gradle` files with
path to the Gradle dependencies in Nix store.

It turns out just replacting lines referencing `mavenCentral()`,
`google()`, and `jcenter()` in `repositories` block is enough to make
Gradle properly fetch dependencies from repo provided via the command
line `-Dmaven.repo.local='${deps.gradle}` option.

This should reduce the required size for shells that don't use Gradle.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-20 10:50:29 +02:00
Jakub Sokołowski 73a8992db7
nix: refactor loading of node.js modules
Changes:
- Drop `nix/mobile/android/maven-and-npm-deps/default.nix`
- Replace it with much simpler `nix/tools/patchNodeModules`
- Move Gradle patching tool to `nix/pkgs/patch-maven-srcs`
- Simplify it by using `gradle.deps` and patched node modules separately
- Change `TARGET` for `release-android` to `default`
- Move `mobile/reset-node_modules.sh` to `scripts/node_modules.sh`
- Move `nix/mobile/android/targets/release-android.nix` to `nix/mobile/android/release.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 16:19:27 +02:00
Jakub Sokołowski ed4d0a1ed9
nix: refactor updating Gradle dependencies
changes:
- Moved Gradle deps setup to `nix/deps/gradle`
- Dropped `nix/mobile/android/maven-and-npm-deps/maven`
- Used GNU Parallel to optimize `nix/deps/gradle/generate.sh`
- Move Maven+Node shell setup from `release-android.nix` to Android shell
- Moved AAPT2 patching to `nix/pkgs/aapt2`
- Drop `patchPhase` and `gradlew` use from `release-android.nix`
- Simplify symlinking `{mobile,desktop}/js_files/*`
- Add new `nodejs` shell and merge it with `clojure` and `gradle`
- Re-created Gradle deps files with new scripts:
  - `nix/deps/gradle/proj.list`
  - `nix/deps/gradle/deps.list`
  - `nix/deps/gradle/deps.urls`
  - `nix/deps/gradle/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:30 +02:00
Jakub Sokołowski 42fb40476c
nix: reafactoring of status-go builds
Changes:
- Fixed `nix/status-go/desktop` builds
- Dropped nimbus wrapper for `status-go` for now
- Split `status-go` builds into subfolders: `mobile`, `desktop`
- Fixed shells for desktop builds: `linux`,`macos`,`windows`
- Added `make status-go-*` targets for building them
- Moved source management to `nix/status-go/source.nix`
- Moved `nix/status-go/build.nix` into `nix/status-go/mobile`
- Moved `nix/desktop/cmake/qtkeychain` to `nix/pkgs/qtkeychain-src`
- Moved `nix/desktop/linux/linuxdeployqt` to `nix/pkgs`
- Moved `nix/desktop/linux/appimagekit` to `nix/pkgs`
- Dropped `nix/tools/mkShell.nix` since it did almost nothing
- Dropped `nix/desktop/cmake/snorenotify` since it's broken
- Moved setup from `nix/tools/mkShell.nix` to `nix/shells.nix`
- Simplified `nix/mobile/ios/status-go-shell.nix`
- Simplified `nix/status-go/default.nix`
- Updated the `nix/DETAILS.md` and `nix/README.md`
- Moved known issues to `nix/KNOWN_ISSUES.md`
- Improved output of `nix/scripts/build.sh`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-04 20:55:07 +02:00
Jakub Sokołowski 7b6b620ceb
nix: use overlays instead of packageOverrides
Changes:
- Add `nix/DETAILS.md` for more in-depth info
- Rename some of `config.status-im` variables
- Drop `env` argument for Android build
- Use `overlays` instead of `packageOverrides`
- Move the `pkgs` overlay to `nix/overlay.nix`
- Move `nix/status-go/utils.nix` to `nix/tools`
- Make `shell.nix` use the `shells.default` only
- Use `default.nix` as target for `nix/scripts/shell.sh`
- Make `nix/scripts/shell.sh` use `--attr` instead of `target`
- Drop the `target` argument in favour of using `--attr`
- Drop unnecessary `src` from `nix/mobile/ios/default.nix`
- Move `mkShell` and `mergeSh` under `lib`
- Move `patched-go` package to `nix/pkgs` directory
- Move `gomobile` package to `nix/pkgs` directory
- Move `ANDROID_ABI_SPLIT` to `config.status-im.android.abi-split`
- Move `ANDROID_ABI_INCLUDE to `config.status-im.android.abi-include`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-29 11:53:33 +02:00