Commit Graph

26 Commits

Author SHA1 Message Date
Jakub Sokołowski aca703a011
major nix refactor
Changes:
- Adds a new `nix-gc` Makefile target for removing old packages
- Moves all `nix/*.sh` files to `nix/scripts/*.sh` to make things more tidy
- Renames `TARGET_OS` into `TARGET` and makes it effective only with `nix/scripts/shell.sh`
- Renames `target-os` Nix argument to just `target` and makes it effective only with `shell.nix`
- Drops `IN_CI_ENVIRONMENT` env variable which was useless
- Drops use of `target-os` argument outside of `shell.nix` (with few exceptions, but just in naming)
- `nix/platform.nix` has been made obsolete and removed
- Moves the definition of all major targets to `nix/targets.nix`
- Moves the definition of all major shells to `nix/shells.nix`
- Makes `default.nix` and `shell.nix` just thin wrappers around `nix/default.nix`
- `nix/nixpkgs-bootstrap.nix` has been moved to `nix/pkgs.nix`
- All package and tool overrides have been moved to `nix/pkgs.nix`
- Explicit passing of contents of `pkgs` has been removed in favor of `callPackage` doing it for us
- `nix/bootstrapped-shell.nix` has been moved to `nix/tools/mkShell.nix`
- A new `mergeSh` tool has been added to `pkgs` from `nix/tools/mergeSh.nix`
  - This tool is used to merge shells created using `mkShell`
- `mobile/targets/jsbundle.nix` has been moved to `mobile/android/jsbundle/default.nix`
- Moves `status-go` version sanitization to `nix/status-go/utils.nix`
- Renames version to rawVersion and versionName to cleanVersion in status-go derivation
- Ports nix/mobile/ios/install-pods-and-status-go.sh to Nix sub-shells
- Moves adjustment of `inotify/max_user_watches` out into `scripts/inotify_fix.sh`
- Makes iOS builds use the Nix version of Fastlane

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-12-12 18:51:21 +01:00
Jakub Sokołowski b32dd113f6
nix: upgrade nixpkgs
Also:
- upgrade Go: 1.12 > 1.13
- upgrade Android SDK: 28.0.3 > 29.0.2
- nix: stop using system Fastlane for iOS builds
- nix: include CocoaPods in shell for iOS
- nix: concatenate shellHooks correctly
- fix gomobile status-go build by setting GO111MODULE=off
- fix gradle accepting empty STATUS_GO_SRC_OVERRIDE value
- don't use a pure shell for uploadToSauceLabs()

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-26 16:30:41 +01:00
Pedro Pombeiro af7341447c
nix: Remove need to pass default values in `--arg config`
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-11-17 16:26:58 +01:00
Pedro Pombeiro e38e9f1072
Ensure `STATUS_GO_SRC_OVERRIDE` gets passed to the Nix shell's `config`
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-11-15 16:12:13 +01:00
Vitaliy Vlasov f28fd8fc9c
customize TMPDIR and clean it
Also:
- parallelize upload and achive stages
- fix s3cmd uploads for combined Jenkinsfile
- fix failing TestFlight clean job

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-18 09:40:11 +02:00
Jakub Sokołowski afc2412514
desktop builds need GnuPG
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-17 11:03:41 +02:00
Pedro Pombeiro 8c7323e126
Use flock to create exclusive locks on node_modules/
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-09-13 17:46:18 +02:00
Jakub Sokołowski 7517f5235a
use nix shell for nix-update-* targets
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-30 14:11:02 -04:00
Pedro Pombeiro 9594552102
nix: Apply some nixfmt suggestions and fix macOS status-go buildInputs
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-07-29 18:01:07 +02:00
Pedro Pombeiro acf6278383
nix: Use nix/build.sh for release-android make target
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-26 16:01:06 -04:00
Pedro Pombeiro f6527f014e
nix: Improve some expressions 2019-07-19 20:59:16 +02:00
Jakub Sokołowski 0d78e71ece
allow for TARGET_OS to be not set
If we don't we will rebuild status-go for every platform
when we running `make shell`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-17 12:07:18 -04:00
Pedro Pombeiro a7fd659d84
nix: Wrap gradle, npm packages, `lein prod-build` and `gradle assembleRelease` in Nix expressions to improve reproducible builds with constant build paths 2019-07-15 16:08:02 +02:00
Pedro Pombeiro 48c7f928cd
Clean up some nix files 2019-07-05 13:40:31 +02:00
Pedro Pombeiro fad5f318cf
Ensure shell.nix uses same nixpkgs as the rest of the environment
also remove gradle wrapper

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-06-20 09:18:24 -04:00
Pedro Pombeiro 1457f0f017
Some changes from the node2nix test branch that don't need to be there
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-06-06 19:13:31 +02:00
Pedro Pombeiro ee127722ce
nix: Move debug realm into desktop folder and use RN cli from node_modulesSigned-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com> 2019-05-23 22:54:43 +02:00
Jakub Sokołowski 0e8e5a51ba
refactor nix_sh to give it optional Map arguments
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-05-14 16:06:16 +02:00
Pedro Pombeiro b542c7de26
Minor refactoring of the way dependency packages are iterated for shellHook and buildInputs.
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-13 13:08:28 +02:00
Pedro Pombeiro 93efc0cd05
Run prepare-for-desktop.sh in an impure shell 2019-05-10 11:48:32 +02:00
Pedro Pombeiro cc009a3c2c
nix: Minor cleanup of fastlane expression
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-09 18:33:40 +02:00
Pedro Pombeiro 49fbf21f8d
Split status-go Nix package per platform so rebuilds are faster
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-06 14:40:23 +02:00
Pedro Pombeiro 9d1e266145
Use fastlane Nix package instead of ruby/bundler for Android
- iOS still has issues with native Ruby dependencies

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-06 11:57:12 +02:00
Pedro Pombeiro b575f5f6a5
Create androidenv package with accepted license so build can run with --pure 2019-05-06 11:56:51 +02:00
Pedro Pombeiro a436793fa0
Consolidate TARGET_SYSTEM_NAME and TARGET_PLATFORM with TARGET_OS
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-04-15 20:31:38 +01:00
Pedro Pombeiro aeacbd928e
Separate logic into shell.nix and derivation.nix to fix `nix build` command
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-04-11 17:44:29 +02:00