mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-12 17:54:32 +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>
50 lines
1.5 KiB
Nix
50 lines
1.5 KiB
Nix
{ stdenv, lib, pkgs, mkShell, callPackage
|
|
, status-go, qtkeychain-src }:
|
|
|
|
let
|
|
inherit (stdenv) isLinux isDarwin;
|
|
inherit (lib) mapAttrs catAttrs optional unique mergeSh;
|
|
|
|
# utilities
|
|
baseImageFactory = callPackage ./base-image { };
|
|
|
|
# main targets
|
|
linux = callPackage ./linux { inherit status-go baseImageFactory; };
|
|
macos = callPackage ./macos { inherit status-go baseImageFactory; };
|
|
windows = callPackage ./windows { inherit baseImageFactory; };
|
|
|
|
selectedSources =
|
|
optional isLinux linux ++
|
|
optional isLinux windows ++
|
|
optional isDarwin macos;
|
|
|
|
# default shell for desktop builds
|
|
default = mkShell {
|
|
buildInputs = with pkgs; unique ([
|
|
file moreutils cmake
|
|
extra-cmake-modules
|
|
qtkeychain-src
|
|
] ++ (catAttrs "buildInputs" selectedSources));
|
|
|
|
inputsFrom = [ status-go.desktop ]
|
|
++ (catAttrs "shell" selectedSources);
|
|
|
|
# These variables are used by the Status Desktop CMake build script in:
|
|
# - modules/react-native-status/desktop/CMakeLists.txt
|
|
shellHook = ''
|
|
export STATUS_GO_DESKTOP_INCLUDEDIR=${status-go.desktop}/include
|
|
export STATUS_GO_DESKTOP_LIBDIR=${status-go.desktop}/lib
|
|
# QT Keychain library sources
|
|
export QTKEYCHAIN_SOURCES="${qtkeychain-src}/src"
|
|
'';
|
|
};
|
|
|
|
# for merging default shell
|
|
mergeDefaultShell = (key: val: { shell = mergeSh default [ val.shell ]; });
|
|
|
|
in {
|
|
shell = default;
|
|
}
|
|
# merge default shell with platform sub-shells
|
|
// mapAttrs mergeDefaultShell { inherit linux windows macos; }
|