CGAL with qt build problem

Hi there,

I’m trying to use CGAL with QT5, and I even was able to build CGAL itself, but when I’m trying to use it in my project I get a permission error:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build
-- The C compiler identification is Clang 7.1.0
-- The CXX compiler identification is Clang 7.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/pn7civzl9k9a5c3kwdk0g3y16gi31w2v-clang-wrapper-7.1.0/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/pn7civzl9k9a5c3kwdk0g3y16gi31w2v-clang-wrapper-7.1.0/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: log log_setup program_options 
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /nix/store/pn7civzl9k9a5c3kwdk0g3y16gi31w2v-clang-wrapper-7.1.0/bin/clang++ compiler.
-- Found GMP: /nix/store/fpp0yqcr5il5jaax434kcj5y3qfgwg1l-gmp-6.2.1/lib/libgmp.so  
-- Found MPFR: /nix/store/xfxb8469a6b6h5wa7l8cpa7fr86sqip8-mpfr-4.1.0/lib/libmpfr.so  
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48")  
-- Boost include dirs: /usr/include
-- Boost libraries:    
CMake Error at /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:257 (configure_file):
  Permission denied
Call Stack (most recent call first):
  /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:339 (_qt5_parse_qrc_file)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_Qt5_moc_and_resource_files.cmake:36 (qt5_add_resources)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_SetupCGAL_Qt5Dependencies.cmake:55 (include)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGALConfig.cmake:128 (include)
  CMakeLists.txt:17 (find_package)


CMake Error at /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:257 (configure_file):
  Permission denied
Call Stack (most recent call first):
  /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:339 (_qt5_parse_qrc_file)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_Qt5_moc_and_resource_files.cmake:36 (qt5_add_resources)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_SetupCGAL_Qt5Dependencies.cmake:55 (include)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGALConfig.cmake:128 (include)
  CMakeLists.txt:17 (find_package)


CMake Error at /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:257 (configure_file):
  Permission denied
Call Stack (most recent call first):
  /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:339 (_qt5_parse_qrc_file)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_Qt5_moc_and_resource_files.cmake:36 (qt5_add_resources)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_SetupCGAL_Qt5Dependencies.cmake:55 (include)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGALConfig.cmake:128 (include)
  CMakeLists.txt:17 (find_package)


CMake Error at /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:257 (configure_file):
  Permission denied
Call Stack (most recent call first):
  /nix/store/56ylm54229k8wr05mn1rj0wkssb1hg95-qt-full-5.15.2/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:339 (_qt5_parse_qrc_file)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_Qt5_moc_and_resource_files.cmake:36 (qt5_add_resources)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGAL_SetupCGAL_Qt5Dependencies.cmake:55 (include)
  /nix/store/61cmrijxdbqh21dmrxaiiljp6fknwd1s-cgal-5.2/lib/cmake/CGAL/CGALConfig.cmake:128 (include)
  CMakeLists.txt:17 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/szobov/dev/transformers/composert/build/CMakeFiles/CMakeOutput.log".
See also "/home/szobov/dev/transformers/composert/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:2: build] Error 1

I built CGAL in such way:

cgal = pkgs.cgal_5.overrideAttrs (oldAttrs: rec {
  buildInputs = [ pkgs.boost pkgs.gmp pkgs.mpfr pkgs.qt5.full pkgs.gtk3];
});

May someone help me please with this issue?
Thanks.