From 84c0620b336e93b92cbe574879603615568f304e Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Thu, 30 Mar 2023 20:28:31 +0000
Subject: [PATCH] feat: use spack include for central config

---
 spack-environment/concretizer.yaml |  2 ++
 spack-environment/dev/spack.yaml   | 16 ++++++++--------
 spack-environment/packages.yaml    |  5 +++++
 3 files changed, 15 insertions(+), 8 deletions(-)
 create mode 100644 spack-environment/concretizer.yaml
 create mode 100644 spack-environment/packages.yaml

diff --git a/spack-environment/concretizer.yaml b/spack-environment/concretizer.yaml
new file mode 100644
index 000000000..fa85803e3
--- /dev/null
+++ b/spack-environment/concretizer.yaml
@@ -0,0 +1,2 @@
+concretizer: 
+  unify: true
diff --git a/spack-environment/dev/spack.yaml b/spack-environment/dev/spack.yaml
index 473a9dc92..52c32008e 100644
--- a/spack-environment/dev/spack.yaml
+++ b/spack-environment/dev/spack.yaml
@@ -1,4 +1,7 @@
 spack:
+  include: 
+  - ../concretizer.yaml
+  - ../packages.yaml
   specs:
     - acts@21.1.0 +dd4hep +identification +json +tgeo +examples +fatras +geant4 +python
     - actsvg@0.4.26 +examples
@@ -73,11 +76,8 @@ spack:
     - stow@2.3.1
     - tensorflow-lite@2.8.0 -xnnpack
     - xrootd@5.5.1 cxxstd=17 +python +scitokens-cpp
-  concretizer: 
-    unify: true
-  packages:
-    all:
-      compiler: [gcc]
-      variants:
-        +ipo build_type=Release
-  view: /usr/local
+  view:
+    default:
+      root: /usr/local
+      link: all
+      link_type: symlink
diff --git a/spack-environment/packages.yaml b/spack-environment/packages.yaml
new file mode 100644
index 000000000..a32c7bba9
--- /dev/null
+++ b/spack-environment/packages.yaml
@@ -0,0 +1,5 @@
+packages:
+  all:
+    compiler: [gcc]
+    variants:
+      +ipo build_type=Release
-- 
GitLab