diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7e7348ffeeca9e8e39a16adabd7ce9b3eed0418f..60dda5aa0723a741d5aa31ddf99f21d47fe56539 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,7 +46,7 @@ docs:
   <<: *RUN_ON_MERGE_REQUEST
   stage: "build"
   script:
-    - "nix-build --attr docs --out-link result-docs"
+    - "nix build .#docs --out-link result-docs"
     # GitLab wants to lchown artifacts.  It can't do that to store paths.  Get
     # a copy of the docs outside of the store.
     - "cp --recursive --no-preserve=mode ./result-docs/docs ./docs-build/"