about summary refs log tree commit diff
path: root/third_party/nix/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke Granger-Brown <hg@lukegb.com>2020-06-21T20·40+0100
committerlukegb <lukegb@tvl.fyi>2020-06-21T23·49+0000
commitb99829f142a6de8360e282348b60b4c3c0f210b5 (patch)
tree0e643ecb45bdc40a01c0a7fff842b48e569faa18 /third_party/nix/CMakeLists.txt
parent4ea8cc373002ec547458c2ea8114f9a83222a4a2 (diff)
fix(3p/nix): install nix_config.h and config.nix r/1054
This also installs the rest of corepkgs as a side-effect.

Change-Id: I67a42d45793d5e8fdad51c1f306eebf63e9c2868
Reviewed-on: https://cl.tvl.fyi/c/depot/+/548
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'third_party/nix/CMakeLists.txt')
-rw-r--r--third_party/nix/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/third_party/nix/CMakeLists.txt b/third_party/nix/CMakeLists.txt
index f325f5a5d98b..54bf36233210 100644
--- a/third_party/nix/CMakeLists.txt
+++ b/third_party/nix/CMakeLists.txt
@@ -40,5 +40,14 @@ add_subdirectory(glog)
 # generate a configuration file (autoheader-style) to configure
 # certain symbols that Nix depends on.
 configure_file(config.h.in nix_config.h @ONLY)
+INSTALL(FILES "${PROJECT_BINARY_DIR}/nix_config.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/nix")
+
+# install corepkgs
+configure_file(corepkgs/config.nix.in config.nix @ONLY)
+INSTALL(DIRECTORY corepkgs
+  DESTINATION ${CMAKE_INSTALL_DATADIR}/nix
+  FILES_MATCHING
+    PATTERN "*.nix")
+INSTALL(FILES "${PROJECT_BINARY_DIR}/config.nix" DESTINATION "${CMAKE_INSTALL_DATADIR}/nix/corepkgs")
 
 add_subdirectory(src)