mirror of
https://github.com/status-im/status-react.git
synced 2025-01-09 10:42:53 +00:00
Jakub Sokołowski
42fb40476c
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>
48 lines
1.4 KiB
Nix
48 lines
1.4 KiB
Nix
#
|
|
# This fetches nimbus source from local folder or GitHub and
|
|
# loads the derivation defined in the `nix/default.nix` in the repo.
|
|
#
|
|
|
|
{ config, lib, stdenv, callPackage, fetchFromGitHub }:
|
|
|
|
let
|
|
inherit (lib) getConfig attrByPath strings traceValFn;
|
|
|
|
repo = "nimbus";
|
|
|
|
localPath = getConfig "nimbus.src-override" "";
|
|
localSrc =
|
|
# We use builtins.path so that we can name the resulting derivation.
|
|
# Name would be taken from the checkout directory, and wouldn't be deterministic.
|
|
builtins.path rec {
|
|
path = traceValFn (path: ''
|
|
Using local ${repo} sources from ${path}
|
|
'') localPath;
|
|
name = "${repo}-source-local";
|
|
filter =
|
|
# Keep this filter as restrictive as possible in order to
|
|
# avoid unnecessary rebuilds and limit closure size
|
|
lib.mkFilter {
|
|
root = path;
|
|
include = [
|
|
"nix.*" "wrappers.*" "vendor.*"
|
|
"Makefile" "nim.cfg" "nimbus.nimble" "default.nix"
|
|
];
|
|
};
|
|
};
|
|
|
|
ghSrc = fetchFromGitHub rec {
|
|
inherit repo;
|
|
name = "${repo}-source-${strings.substring 0 7 rev}";
|
|
rev = "73278f20d0bf27fb7c6c331b515abb765814f1cc";
|
|
owner = "status-im";
|
|
sha256 = "0myq234zqnpmqsc2452xygnyc6sjs8x1blyrpa4bi9v2cwbyap5c";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
src = if localPath != "" then localSrc else ghSrc;
|
|
|
|
nimbusDeriv = import "${src}/nix/default.nix";
|
|
|
|
in nimbusDeriv
|