irods: fix cmakeFlags for __structuredAttrs

This commit is contained in:
Yueh-Shun Li 2024-08-21 22:34:50 +08:00
parent 2d66a0bf73
commit e44a479b1a
2 changed files with 9 additions and 10 deletions

View File

@ -27,15 +27,13 @@
"-DCPACK_GENERATOR=TGZ"
"-DCMAKE_CXX_FLAGS=-I${lib.getDev libcxx}/include/c++/v1"
"-DPAM_LIBRARY=${pam}/lib/libpam.so"
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
"-DIRODS_HOME_DIRECTORY=${placeholder "out"}"
"-DCMAKE_INSTALL_SBINDIR=${placeholder "out"}/sbin"
];
postPatch = ''
patchShebangs ./packaging ./scripts
export cmakeFlags="$cmakeFlags
-DCMAKE_INSTALL_PREFIX=$out
-DIRODS_HOME_DIRECTORY=$out
-DCMAKE_INSTALL_SBINDIR=$out/sbin
"
'';
meta = with lib; {

View File

@ -32,6 +32,12 @@ rec {
# fix build with recent llvm versions
env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations";
cmakeFlags = common.cmakeFlags or [ ] ++ [
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${placeholder "out"}/lib"
"-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${placeholder "out"}/lib"
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,${placeholder "out"}/lib"
];
postPatch = common.postPatch + ''
patchShebangs ./test
substituteInPlace plugins/database/CMakeLists.txt --replace-fail "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp"
@ -39,11 +45,6 @@ rec {
do
substituteInPlace $file --replace-quiet "CATCH2}/include" "CATCH2}/include/catch2"
done
export cmakeFlags="$cmakeFlags
-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib
-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,$out/lib
"
substituteInPlace server/auth/CMakeLists.txt --replace-fail SETUID ""
'';