about summary refs log tree commit diff
path: root/pkgs/build-support/lib/cmake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/lib/cmake.nix')
-rw-r--r--pkgs/build-support/lib/cmake.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/build-support/lib/cmake.nix b/pkgs/build-support/lib/cmake.nix
index eff7bbca61a23..57fa586d34555 100644
--- a/pkgs/build-support/lib/cmake.nix
+++ b/pkgs/build-support/lib/cmake.nix
@@ -3,9 +3,8 @@
 let
   inherit (lib) findFirst isString optional optionals;
 
-  makeCMakeFlags = { cmakeFlags ? [], ... }:
-    cmakeFlags
-    ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) ([
+  cmakeFlags' =
+    optionals (stdenv.hostPlatform != stdenv.buildPlatform) ([
       "-DCMAKE_SYSTEM_NAME=${findFirst isString "Generic" (optional (!stdenv.hostPlatform.isRedox) stdenv.hostPlatform.uname.system)}"
     ] ++ optionals (stdenv.hostPlatform.uname.processor != null) [
       "-DCMAKE_SYSTEM_PROCESSOR=${stdenv.hostPlatform.uname.processor}"
@@ -24,6 +23,9 @@ let
     ] ++ optionals stdenv.hostPlatform.isStatic [
       "-DCMAKE_LINK_SEARCH_START_STATIC=ON"
     ]);
+
+  makeCMakeFlags = { cmakeFlags ? [], ... }: cmakeFlags ++ cmakeFlags';
+
 in
 {
   inherit makeCMakeFlags;