Commit Graph

24 Commits

Author SHA1 Message Date
Jakub Sokołowski dbe3e0a3f9
nix: minor cleanup and documentation updates
Changes:
- Simplified `default.nix` and `shell.nix`
- Moved the default shell to `nix/shell.nix`
- Dropped unnecessary merge from  `nix/shells.nix`
- Fixed `nix/lib/getConfig.nix` to return default on `null`
- Expanded `nix/DETAILS.md` with more info
- Added links to presentations in `nix/README.md`
- Fixed a few typos

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-05 14:49:34 +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
Pedro Pombeiro d62cda4d66
nix: Add support for reading .env feature flags 2020-01-14 15:16:30 +01:00
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
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
Jakub Sokołowski b9ab37019d
build status-go for Nix cache
Also fix scripts/update-status-go.sh to accept commit SHA1

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-23 01:01:41 -04: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
Jakub Sokołowski 0fe667ab18
add missing android sdk license acceptance in nix
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-08 15:36:52 -04: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 84dc94f895
nix: name the github sources for readability in logs
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-10 11:49:09 +02:00
Pedro Pombeiro 89f34a7707
Improve makefile to only make Nix install the bare minimum for intended platform
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-04-12 12:18:43 +02: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
Pedro Pombeiro cf6cbd7fa8
Replace usage of `make setup`
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-04-10 11:45:29 +02:00
Pedro Pombeiro 65e6e80349
Create Nix package for building status-go 2019-04-09 12:44:39 +02:00
Pedro Pombeiro 6eb806d2c1
Replace usage of stdenvNoCC.
- For Linux, the real fix is `hardeningDisable` of "fortify";
- For macOS, the real fix is setting the C and CXX compilers in `desktop/build.sh` as well as disabling CMake install step;
- Unfortunately for iOS we still need stdenvNoCC (or find a way to use GNU's ld instead of Apple's)

Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-03-27 14:03:48 +01:00
Pedro Pombeiro c53553e137
Use nix to download Desktop bundle base images
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-03-22 15:06:14 +01:00
Pedro Pombeiro 015f02ae84
Implement target-dependent installing of Nix dependencies 2019-03-21 13:57:01 +01:00
Jakub Sokołowski 9f601e851d
add jenkinsfile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-03-21 13:57:00 +01:00
Pedro Pombeiro 87a7aacd68
Add Android NDK Nix expression 2019-03-21 13:56:59 +01:00
Pedro Pombeiro 2ac5ee019e
Migrate Desktop build environment to leverage Nix
- Add Conan to default.nix
- Integrate Qt5 Nix package (with forked repo for new QtWebView module)
- Fix rpaths in macOS and Linux
- Add Nix expressions to install nsis, appimagekit and linuxdeployqt
2019-03-21 13:56:58 +01:00
Pedro Pombeiro 2e7891406b
Fix problem building `sha3` node module in `make setup` 2019-03-21 13:56:57 +01:00
Pedro Pombeiro 692de32931
Migrate from installing tooling the traditional way to Nix 2019-03-21 13:56:57 +01:00