From c09e03c1a69306c58d2f97453fe9f071171ec48a Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 21 Dec 2022 03:03:38 +0800 Subject: [PATCH 1/2] root: remove the already-default CMAKE_INSTALL_*DIR flags --- pkgs/applications/science/misc/root/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index f0924d1402a..d9758938405 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -157,9 +157,6 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-Drpath=ON" - "-DCMAKE_INSTALL_BINDIR=bin" - "-DCMAKE_INSTALL_LIBDIR=lib" - "-DCMAKE_INSTALL_INCLUDEDIR=include" "-Dbuiltin_llvm=OFF" "-Dbuiltin_nlohmannjson=OFF" "-Dbuiltin_openui5=OFF" From c1027175c1cd3fa4c903e340dc7b75768ff99ede Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Tue, 20 Dec 2022 16:53:05 +0800 Subject: [PATCH 2/2] root: fix output directory layout with -Dgnuinstall=ON Make "$out" more conformant to the bin/ lib/ share/ hirarchy instead of messing up the user profile with stuff like cmake/ config/ macros/ icons/ js/ tutorials/ ... In this layout, * `tutorials` is now under `share/doc/ROOT/tutorial` * `cmake`, `font`, `icons`, `js` and `macro` is now under `share/root` * `Makefile.comp` and `Makefile.config` in now under `etc/root`. --- .../from_md/release-notes/rl-2305.section.xml | 16 ++++++++++++++++ .../doc/manual/release-notes/rl-2305.section.md | 2 ++ pkgs/applications/science/misc/root/default.nix | 1 + 3 files changed, 19 insertions(+) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml index 657b5c6f26d..ec3e2a2fe89 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml @@ -288,6 +288,22 @@ dynamically. + + + The root package is now built with the + "-Dgnuinstall=ON" CMake flag, + making the output conform the bin + lib share layout. In + this layout, tutorials is under + share/doc/ROOT/; cmake, + font, icons, + js and macro under + share/root; + Makefile.comp and + Makefile.config under + etc/root. + + Enabling global redirect in diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 27bd64e514f..33c1d9f5a90 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -82,6 +82,8 @@ In addition to numerous new and upgraded packages, this release has the followin - The new option `users.motdFile` allows configuring a Message Of The Day that can be updated dynamically. +- The `root` package is now built with the `"-Dgnuinstall=ON"` CMake flag, making the output conform the `bin` `lib` `share` layout. In this layout, `tutorials` is under `share/doc/ROOT/`; `cmake`, `font`, `icons`, `js` and `macro` under `share/root`; `Makefile.comp` and `Makefile.config` under `etc/root`. + - Enabling global redirect in `services.nginx.virtualHosts` now allows one to add exceptions with the `locations` option. - Resilio sync secret keys can now be provided using a secrets file at runtime, preventing these secrets from ending up in the Nix store. diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index d9758938405..af6aed851e0 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -171,6 +171,7 @@ stdenv.mkDerivation rec { "-Dfftw3=OFF" "-Dfitsio=OFF" "-Dfortran=OFF" + "-Dgnuinstall=ON" "-Dimt=ON" "-Dgfal=OFF" "-Dgviz=OFF"