Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3149435
D4629.id14897.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4629.id14897.diff
View Options
diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -84,6 +84,7 @@
# shell commands to be ran upon entering shell
shellHook = let
socket = "mysql-socket/mysql.sock";
+ awsDev = lib.getDev aws-sdk-cpp;
in ''
if [[ "$OSTYPE" == 'linux'* ]]; then
export MYSQL_UNIX_PORT=''${XDG_RUNTIME_DIR:-/run/user/$UID}/${socket}
@@ -101,6 +102,8 @@
export LD_LIBRARY_PATH=${lib.makeLibraryPath [ stdenv.cc.cc.lib zlib ]}
fi
+ export AWSSDK_CORE_HEADER_FILE=${awsDev}/include/aws/core/Aws.h
+
echo "Welcome to Comm dev environment! :)"
'';
}
diff --git a/nix/overlay.nix b/nix/overlay.nix
--- a/nix/overlay.nix
+++ b/nix/overlay.nix
@@ -10,6 +10,20 @@
prev:
{
+ # Patch aws-sdk-cpp to automatically pick up header location
+ # when using `find_package(AWSSDK COMPONENTS [comps])`
+ aws-sdk-cpp = (prev.aws-sdk-cpp.overrideAttrs(oldAttrs:{
+ postPatch = oldAttrs.postPatch + ''
+ substituteInPlace cmake/AWSSDKConfig.cmake \
+ --replace 'C:/AWSSDK/''${AWSSDK_INSTALL_INCLUDEDIR}/aws/core' \
+ 'C:/AWSSDK/''${AWSSDK_INSTALL_INCLUDEDIR}/aws/core"
+ "${placeholder "dev"}/include/aws/core'
+ '';
+ })).override {
+ # avoid rebuildilng all 300+ apis
+ apis = [ "core" "s3" "dynamodb" ];
+ };
+
# add packages meant for just this repository
amqp-cpp = prev.callPackage ./amqp-cpp.nix { };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 5, 1:57 PM (14 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2426142
Default Alt Text
D4629.id14897.diff (1 KB)
Attached To
Mode
D4629: [Nix] Patch aws-sdk-cpp to automatically find Aws.h
Attached
Detach File
Event Timeline
Log In to Comment