aws-c-common: 0.6.9 -> 0.6.12, cleanup

* add setup hook for interface cmake module
* sba_metrics fails on musl
This commit is contained in:
Ryan Burns 2021-09-25 12:10:21 -07:00
parent 359481f255
commit 310e86a834
6 changed files with 19 additions and 8 deletions

View file

@ -19,7 +19,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_MODULE_PATH=${aws-c-common}/lib/cmake"
];
meta = with lib; {

View file

@ -7,13 +7,13 @@
stdenv.mkDerivation rec {
pname = "aws-c-common";
version = "0.6.9";
version = "0.6.12";
src = fetchFromGitHub {
owner = "awslabs";
repo = pname;
rev = "v${version}";
sha256 = "sha256-bnKIL51AW+0T87BxEazXDZElYqiwOUHQVEDKOCUzsbM=";
sha256 = "sha256-Bbb6YbPMpzVy+Pa9OGe62TXihTbUeKTlPS29sa70aQ8=";
};
nativeBuildInputs = [ cmake ];
@ -23,10 +23,20 @@ stdenv.mkDerivation rec {
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
];
# aws-c-common misuses cmake modules, so we need
# to manually add a MODULE_PATH to its consumers
setupHook = ./setup-hook.sh;
# Prevent the execution of tests known to be flaky.
preCheck = ''
preCheck = let
ignoreTests = [
"promise_test_multiple_waiters"
] ++ lib.optionals stdenv.hostPlatform.isMusl [
"sba_metrics" # https://github.com/awslabs/aws-c-common/issues/839
];
in ''
cat <<EOW >CTestCustom.cmake
SET(CTEST_CUSTOM_TESTS_IGNORE promise_test_multiple_waiters)
SET(CTEST_CUSTOM_TESTS_IGNORE ${toString ignoreTests})
EOW
'';

View file

@ -0,0 +1,5 @@
addAwsCCommonModuleDir() {
cmakeFlags="-DCMAKE_MODULE_PATH=@out@/lib/cmake ${cmakeFlags:-}"
}
postHooks+=(addAwsCCommonModuleDir)

View file

@ -18,7 +18,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DBUILD_SHARED_LIBS:BOOL=ON"
"-DCMAKE_MODULE_PATH=${aws-c-common}/lib/cmake"
];
meta = with lib; {

View file

@ -18,7 +18,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_MODULE_PATH=${aws-c-common}/lib/cmake"
];
meta = with lib; {

View file

@ -17,7 +17,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_MODULE_PATH=${aws-c-common}/lib/cmake"
];
meta = with lib; {