I added a Nix Flake to HHVM, which requires submodules=1 to build. I can use nix profile install to install the Flake with submodules=1. However nix profile upgrade does not respect submodules=1 and results in build failures.
Then nix profile upgrade '.*' would fail because the git submodules are not actually checked out.
[1/0/1 built, 0.0 MiB DL] building hhvm_nightly-4.164.0-20220708015935 (configurePhase): See also "/tmp/nix-build-hhvm_nightly-4.164.0-20220708015935.drv-0/0r3dkq3k0hscxysmxfhgyi6arc4ld26v-source/build/CMakeFiles/CMakeError.log".
error: builder for '/nix/store/4n9lcf0lkanbsh8hlhk0g5d2dxx5g4s4-hhvm_nightly-4.164.0-20220708015935.drv' failed with exit code 1;
last 10 log lines:
> Policy CMP0076 is not set: target_sources() command converts relative paths
> to absolute. Run "cmake --help-policy CMP0076" for policy details. Use
> the cmake_policy command to set the policy and suppress this warning.
>
> An interface source of target "hhvm" has a relative path.
> This warning is for project developers. Use -Wno-dev to suppress it.
>
> -- Configuring incomplete, errors occurred!
> See also "/tmp/nix-build-hhvm_nightly-4.164.0-20220708015935.drv-0/0r3dkq3k0hscxysmxfhgyi6arc4ld26v-source/build/CMakeFiles/CMakeOutput.log".
> See also "/tmp/nix-build-hhvm_nightly-4.164.0-20220708015935.drv-0/0r3dkq3k0hscxysmxfhgyi6arc4ld26v-source/build/CMakeFiles/CMakeError.log".
For full logs, run 'nix log /nix/store/4n9lcf0lkanbsh8hlhk0g5d2dxx5g4s4-hhvm_nightly-4.164.0-20220708015935.drv'.
Expected behavior
No error
nix-env --version output
nix-env (Nix) 2.8.0
Additional context
This bug can be reproduced in both macOS and Linux.
I cannot see submodules=1 from nix profile list even when I previously executed nix profile install with submodules=1
Describe the bug
I added a Nix Flake to HHVM, which requires
submodules=1
to build. I can usenix profile install
to install the Flake withsubmodules=1
. Howevernix profile upgrade
does not respectsubmodules=1
and results in build failures.Steps To Reproduce
Then
nix profile upgrade '.*'
would fail because the git submodules are not actually checked out.Expected behavior
No error
nix-env --version
outputnix-env (Nix) 2.8.0
Additional context This bug can be reproduced in both macOS and Linux.
I cannot see
submodules=1
fromnix profile list
even when I previously executednix profile install
withsubmodules=1