Skip to content

Commit

Permalink
fix: reformatting metadata for clikchouse dep as git was not able to …
Browse files Browse the repository at this point in the history
…fetch
  • Loading branch information
samrose committed Oct 24, 2024
1 parent 73944e1 commit 9ae9c9f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ postgres_major:
postgres_release:
#postgres15: "15.8.1.003-staging-5"
#postgres16: "16.3.1.000-staging-5"
postgresorioledb-16: "orioledb-16.3.1.000-staging-11"
postgresorioledb-16: "orioledb-16.3.1.000-staging-12"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
36 changes: 36 additions & 0 deletions nix/ext/wrappers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,46 @@ buildPgrxExtension_0_12_6 rec {
CARGO_BUILD_JOBS = "2";
CARGO="${cargo}/bin/cargo";

#CARGO_NET_GIT_FETCH_WITH_CLI = "true";
cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
};

preConfigure = ''
cd wrappers
# update the clickhouse-rs dependency
# append the branch name to the git URL to help cargo locate the commit
# while maintaining the rev for reproducibility
awk -i inplace '
/\[dependencies.clickhouse-rs\]/ {
print
getline
if ($0 ~ /git =/) {
print "git = \"https://github.com/suharev7/clickhouse-rs/async-await\""
} else {
print
}
while ($0 !~ /^\[/ && NF > 0) {
getline
if ($0 ~ /rev =/) print
if ($0 ~ /^\[/) print
}
next
}
{ print }
' Cargo.toml
# Verify the file is still valid TOML, break build with this error
# if it is not
if ! cargo verify-project 2>/dev/null; then
echo "Failed to maintain valid TOML syntax"
exit 1
fi
cd ..
'';

buildAndTestSubdir = "wrappers";
buildFeatures = [
Expand Down

0 comments on commit 9ae9c9f

Please sign in to comment.