mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 11:06:25 +00:00
Jakub Sokołowski
dbe3e0a3f9
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>
12 lines
282 B
Nix
12 lines
282 B
Nix
# helper for getting status-im config values in a safe way
|
|
#
|
|
|
|
{ lib, config }:
|
|
|
|
let inherit (lib) splitString attrByPath;
|
|
in name: default:
|
|
let
|
|
path = [ "status-im" ] ++ (splitString "." name);
|
|
value = attrByPath path default config;
|
|
in if value != null then value else default
|