nix run fails with CMake Error #3

Open
opened 2026-05-20 04:52:09 +00:00 by KingRocco21 · 3 comments
KingRocco21 commented 2026-05-20 04:52:09 +00:00 (Migrated from github.com)

Hi friends!

Right now, running the command nix run github:ALUGatUCI/peterfetch gives the error:

error: Cannot build '/nix/store/n9chq0sq59aba2a75dx9nhj08w7mw67k-peterfetch-unstable.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/7xpszav2vr3afrdykji70bfz4848j9h1-peterfetch-unstable
       Last 25 log lines:
       >    * SOURCE_DIR with an existing non-empty directory
       >    * DOWNLOAD_COMMAND
       >    * URL
       >    * GIT_REPOSITORY
       >    * SVN_REPOSITORY
       >    * HG_REPOSITORY
       >    * CVS_REPOSITORY and CVS_MODULE
       > Call Stack (most recent call first):
       >   /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake:3080 (_ep_add_download_command)
       >   CMakeLists.txt:21 (ExternalProject_Add)
       >
       >
       > -- Configuring incomplete, errors occurred!
       > CMake Error at /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1906 (message):
       >   CMake step for cpr failed: 1
       > Call Stack (most recent call first):
       >   /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
       >   /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
       >   /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145 (cmake_language)
       >   /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
       >   cmake/cpr.cmake:9 (FetchContent_MakeAvailable)
       >   CMakeLists.txt:46 (include)
       >
       >
       > -- Configuring incomplete, errors occurred!
       For full logs, run:
         nix log /nix/store/n9chq0sq59aba2a75dx9nhj08w7mw67k-peterfetch-unstable.drv
Hi friends! Right now, running the command `nix run github:ALUGatUCI/peterfetch` gives the error: ```shell error: Cannot build '/nix/store/n9chq0sq59aba2a75dx9nhj08w7mw67k-peterfetch-unstable.drv'. Reason: builder failed with exit code 1. Output paths: /nix/store/7xpszav2vr3afrdykji70bfz4848j9h1-peterfetch-unstable Last 25 log lines: > * SOURCE_DIR with an existing non-empty directory > * DOWNLOAD_COMMAND > * URL > * GIT_REPOSITORY > * SVN_REPOSITORY > * HG_REPOSITORY > * CVS_REPOSITORY and CVS_MODULE > Call Stack (most recent call first): > /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake:3080 (_ep_add_download_command) > CMakeLists.txt:21 (ExternalProject_Add) > > > -- Configuring incomplete, errors occurred! > CMake Error at /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1906 (message): > CMake step for cpr failed: 1 > Call Stack (most recent call first): > /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild) > /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation) > /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145 (cmake_language) > /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2384 (__FetchContent_Populate) > cmake/cpr.cmake:9 (FetchContent_MakeAvailable) > CMakeLists.txt:46 (include) > > > -- Configuring incomplete, errors occurred! For full logs, run: nix log /nix/store/n9chq0sq59aba2a75dx9nhj08w7mw67k-peterfetch-unstable.drv ```
b0x207 commented 2026-05-21 01:40:35 +00:00 (Migrated from github.com)

@KingRocco21 I am unable to reproduce this. Can you share the full build logs from nix log /nix/store/n9chq0sq59aba2a75dx9nhj08w7mw67k-peterfetch-unstable.drv as mentioned in the error.

The build failures that @galacticaledge mentioned are unrelated to this and are due to the tests on his branch for WeatherInfo not using a properly mocked HttpClient.

@KingRocco21 I am unable to reproduce this. Can you share the full build logs from `nix log /nix/store/n9chq0sq59aba2a75dx9nhj08w7mw67k-peterfetch-unstable.drv` as mentioned in the error. The build failures that @galacticaledge mentioned are unrelated to this and are due to the tests on his branch for `WeatherInfo` not using a properly mocked `HttpClient`.
KingRocco21 commented 2026-05-21 03:10:12 +00:00 (Migrated from github.com)

Here is the output of nix log:

Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/jrggqkm9zmqg6rfla1xhpaj3c3fmsdsj-3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source
source root is 3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
cmake flags: -GNinja -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LOCALEDIR=/nix/store/wr893>
-- The CXX compiler identification is GNU 15.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/qd70v8g0561vm8m33kmnp79z00cgyi5n-gcc-wrapper-15.2.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Populating cpr
CMake Error at /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/shared_internal_commands.cmake:1308 (message):
  No download info given for 'cpr-populate' and its source directory:

   /build/3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source/3rd-party/cpr

  is not an existing non-empty directory.  Please specify one of:

   * SOURCE_DIR with an existing non-empty directory
   * DOWNLOAD_COMMAND
   * URL
   * GIT_REPOSITORY
   * SVN_REPOSITORY
   * HG_REPOSITORY
   * CVS_REPOSITORY and CVS_MODULE
Call Stack (most recent call first):
  /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake:3080 (_ep_add_download_command)
  CMakeLists.txt:21 (ExternalProject_Add)


-- Configuring incomplete, errors occurred!
CMake Error at /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1906 (message):
  CMake step for cpr failed: 1
Call Stack (most recent call first):
  /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
  /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
  /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145 (cmake_language)
  /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
  cmake/cpr.cmake:9 (FetchContent_MakeAvailable)
  CMakeLists.txt:46 (include)


-- Configuring incomplete, errors occurred!

Here is the output of nix flake metadata:

Resolved URL:  github:ALUGatUci/peterfetch
Locked URL:    github:ALUGatUci/peterfetch/0acef14a0aea2f46202b5e690e5032f4c2844f56?narHash=sha256-jHKVchANw49bvny2muaCj55GhKXbtHf9iswU7UefnxU%3D
Path:          /nix/store/3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source
Revision:      0acef14a0aea2f46202b5e690e5032f4c2844f56
Last modified: 2026-05-20 18:34:12
Fingerprint:   2f3350a8aeb1435c45de8b848ce95e6e3955cd5a297563a33703e554c129ae70
Inputs:
└───nixpkgs: github:NixOS/nixpkgs/01fbdeef22b76df85ea168fbfe1bfd9e63681b30?narHash=sha256-GMSVw35Q%2B294GlrTUKlx087E31z7KurReQ1YHSKp5iw%3D (2026-04-23 13:07:47)
Here is the output of nix log: ``` Running phase: unpackPhase @nix { "action": "setPhase", "phase": "unpackPhase" } unpacking source archive /nix/store/jrggqkm9zmqg6rfla1xhpaj3c3fmsdsj-3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source source root is 3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source Running phase: patchPhase @nix { "action": "setPhase", "phase": "patchPhase" } Running phase: updateAutotoolsGnuConfigScriptsPhase @nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } Running phase: configurePhase @nix { "action": "setPhase", "phase": "configurePhase" } cmake flags: -GNinja -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LOCALEDIR=/nix/store/wr893> -- The CXX compiler identification is GNU 15.2.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /nix/store/qd70v8g0561vm8m33kmnp79z00cgyi5n-gcc-wrapper-15.2.0/bin/g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Populating cpr CMake Error at /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject/shared_internal_commands.cmake:1308 (message): No download info given for 'cpr-populate' and its source directory: /build/3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source/3rd-party/cpr is not an existing non-empty directory. Please specify one of: * SOURCE_DIR with an existing non-empty directory * DOWNLOAD_COMMAND * URL * GIT_REPOSITORY * SVN_REPOSITORY * HG_REPOSITORY * CVS_REPOSITORY and CVS_MODULE Call Stack (most recent call first): /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/ExternalProject.cmake:3080 (_ep_add_download_command) CMakeLists.txt:21 (ExternalProject_Add) -- Configuring incomplete, errors occurred! CMake Error at /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1906 (message): CMake step for cpr failed: 1 Call Stack (most recent call first): /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild) /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation) /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2145 (cmake_language) /nix/store/v2i1hgv567g3v91im5x4g5bff52143i0-cmake-4.1.2/share/cmake-4.1/Modules/FetchContent.cmake:2384 (__FetchContent_Populate) cmake/cpr.cmake:9 (FetchContent_MakeAvailable) CMakeLists.txt:46 (include) -- Configuring incomplete, errors occurred! ``` Here is the output of nix flake metadata: ``` Resolved URL: github:ALUGatUci/peterfetch Locked URL: github:ALUGatUci/peterfetch/0acef14a0aea2f46202b5e690e5032f4c2844f56?narHash=sha256-jHKVchANw49bvny2muaCj55GhKXbtHf9iswU7UefnxU%3D Path: /nix/store/3s8dg8nnd7sql6gbqkn5j1ghnblqr44d-source Revision: 0acef14a0aea2f46202b5e690e5032f4c2844f56 Last modified: 2026-05-20 18:34:12 Fingerprint: 2f3350a8aeb1435c45de8b848ce95e6e3955cd5a297563a33703e554c129ae70 Inputs: └───nixpkgs: github:NixOS/nixpkgs/01fbdeef22b76df85ea168fbfe1bfd9e63681b30?narHash=sha256-GMSVw35Q%2B294GlrTUKlx087E31z7KurReQ1YHSKp5iw%3D (2026-04-23 13:07:47) ```
b0x207 commented 2026-05-21 03:52:38 +00:00 (Migrated from github.com)

Okay, I have been able to reproduce this. I had the local copy of the source tree already in my Nix store which is why I kept having a function source tree.

It seems that setting inputs.self.submodules = true is not sufficient to have Nix handle dependencies correctly. I will consider adjusting how dependencies are handled to resolve this by moving away from in-tree submodules. That will have to wait for the completion of @galacticaledge's work on WeatherInfo as well as my own work on the layout system.

Until then, the only way to build the project will be do make a full local clone (i.e. git clone https://github.com/ALUGatUCI/peterfetch --recursive and build from inside it.

Okay, I have been able to reproduce this. I had the local copy of the source tree already in my Nix store which is why I kept having a function source tree. It seems that setting `inputs.self.submodules = true` is not sufficient to have Nix handle dependencies correctly. I will consider adjusting how dependencies are handled to resolve this by moving away from in-tree submodules. That will have to wait for the completion of @galacticaledge's work on `WeatherInfo` as well as my own work on the layout system. Until then, the only way to build the project will be do make a full local clone (i.e. `git clone https://github.com/ALUGatUCI/peterfetch --recursive` and build from inside it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
b0x207/peterfetch#3
No description provided.