Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3507014
D5478.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D5478.diff
View Options
diff --git a/nix/ios-shell.nix b/nix/ios-shell.nix
new file mode 100644
--- /dev/null
+++ b/nix/ios-shell.nix
@@ -0,0 +1,104 @@
+{ mkShellNoCC
+, stdenv
+, lib
+, arcanist
+, better-prompt
+, c-ares_cmake-config
+, cmake
+, cmake-format
+, cocoapods
+, corrosion
+, cryptopp
+, darwin
+, libiconv
+, mariadb
+, mariadb-up
+, nodejs-16_x-openssl_1_1
+, protobuf_3_15_cmake
+, redis
+, redis-up
+, rustup
+, shellcheck
+, sqlite
+, terraform
+, watchman
+, rustfmt
+, yarn
+}:
+
+mkShellNoCC {
+
+ # programs which are meant to be executed should go here
+ nativeBuildInputs = [
+ # generic development or tools
+ arcanist
+ shellcheck
+ terraform
+
+ # node development
+ mariadb
+ nodejs-16_x-openssl_1_1
+ yarn
+ watchman # react native
+ redis
+
+ # native dependencies
+ # C/CXX toolchains are already brought in with mkShell
+ # Identity Service
+ rustfmt
+ rustup
+
+ # Tunnelbroker + CMake
+ cmake
+ cmake-format # linting
+
+ protobuf_3_15_cmake
+ ] ++ lib.optionals stdenv.isDarwin [
+ cocoapods # needed for ios
+ ];
+
+ # include any libraries buildInputs
+ buildInputs = [
+ # protobuf exposes both a library and a command
+ # thus should appear in both inputs
+ protobuf_3_15_cmake
+ sqlite # needed for sqlite_orm
+ ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+ CoreFoundation
+ CoreServices
+ Security
+ libiconv # identity service
+ ]);
+
+ # shell commands to be ran upon entering shell
+ shellHook = ''
+ PRJ_ROOT=$(git rev-parse --show-toplevel)
+
+ # Set development environment variable defaults
+ source "${../scripts/source_development_defaults.sh}"
+
+ # Cache development path for some use cases such as XCode
+ "$PRJ_ROOT/scripts/save_path.sh"
+
+ ''
+ # Darwin condition can be removed once linux services are supported
+ + lib.optionalString stdenv.isDarwin ''
+ # Start MariaDB development services
+ "${mariadb-up}"/bin/mariadb-up &
+ mariadb_pid=$!
+
+ "${redis-up}"/bin/redis-up &
+ redis_pid=$!
+
+ wait "$mariadb_pid" "$redis_pid"
+ '' + ''
+
+ # Provide decent bash prompt
+ source "${better-prompt}/bin/better-prompt"
+
+ # Restore BSD versions of common commands
+ export PATH=/usr/bin:$PATH
+
+ echo "Welcome to Comm dev environment! :)"
+ '';
+}
diff --git a/nix/overlay.nix b/nix/overlay.nix
--- a/nix/overlay.nix
+++ b/nix/overlay.nix
@@ -52,6 +52,7 @@
protobuf_3_15_cmake = prev.callPackage ./protobuf_3_15.nix { };
devShells.default = final.callPackage ./dev-shell.nix { };
+ devShells.ios = final.callPackage ./ios-shell.nix { };
devShell = final.devShells.default;
localstack-down = prev.callPackage ./localstack-down.nix { };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 7:01 PM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2688783
Default Alt Text
D5478.diff (2 KB)
Attached To
Mode
D5478: [Nix] Provide iOS specific dev shell
Attached
Detach File
Event Timeline
Log In to Comment