!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

343 Members
https://github.com/nix-community/NixOS-WSL59 Servers

Load older messages


SenderMessageTime
15 Jun 2024
@andreas_dev:matrix.organdreas_dev
In reply to @toddt:matrix.org
good evening, been trying to setup NixOS-WSL for about 3 hours. When I run initial setup of "sudo nixos-rebuild switch" I get the following error "building '/nix/store/vz70pnvz94w0is3vrpkf6yg7kx2q8d9v-nixos-wsl-utils-1.0.0.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/mgs739bd2i6v7cjxilwk0qf9czfd8vg9-utils
source root is utils
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
Running phase: patchPhase
Executing cargoSetupPostPatchHook
Validating consistency between /build/utils/Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
Finished cargoSetupPostPatchHook
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
Running phase: buildPhase
Executing cargoBuildHook
++ env CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu HOST_CC=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc HOST_CXX=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ cargo build -j 16 --target x86_64-unknown-linux-gnu --frozen --profile release
error: package clap_builder v4.5.2 cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.73.0
Either upgrade to rustc 1.74 or newer, or use
cargo update -p clap_builder@4.5.2 --precise ver
where ver is the latest version of clap_builder supporting rustc 1.73.0
error: builder for '/nix/store/vz70pnvz94w0is3vrpkf6yg7kx2q8d9v-nixos-wsl-utils-1.0.0.drv' failed with exit code 101
error: 1 dependencies of derivation '/nix/store/igsm8s0h1sh02zzx4b60mx8phk7b0bl4-nixos-system-nixos-23.11.7609.5c2ec3a5c2ee.drv' failed to build"

As the error seems to be the same as this thread, I do believe you're on 23.11 and you should simply update to 24.05 to resolve the issue.

Look at https://github.com/nix-community/NixOS-WSL/issues/483 for instructions in one of the comments

07:07:11
@toddt:matrix.orgTodd ThompsonOk, will try and provide my feedback. Thanks for quick response08:04:40
@toddt:matrix.orgTodd ThompsonHi, I'm trying to follow (https://github.com/nix-community/NixOS-WSL) but I can't seem to find a 24.05 tar.gz file08:16:19
@k900:0upti.meK900You shouldn't need one08:16:28
@k900:0upti.meK900Just upgrade your system as normal08:16:33
@k900:0upti.meK900You already have an installed system, correct?08:16:41
@toddt:matrix.orgTodd Thompsonyes, but the upgrade doesn't work as the original "sudo nixos-rebuild switch" command always fails08:17:41
@k900:0upti.meK900You need to change your channels08:18:03
@k900:0upti.meK900Or your flake inputs if you're using a flake08:18:08
@toddt:matrix.orgTodd ThompsonI tried both 08:18:30
@toddt:matrix.orgTodd Thompsoncan you provide a quick example08:18:40
@toddt:matrix.orgTodd Thompsonupdating the channel still fails the rebuild08:19:07
@k900:0upti.meK900Do you have a system right now?08:19:51
@k900:0upti.meK900Is it installed with flakes or channels?08:19:56
@toddt:matrix.orgTodd ThompsonI will try a clean install of 23.11 again and attempt to update/upgrade08:20:09
@k900:0upti.meK900You can do a clean install of 23.11 and then just follow https://nixos.org/manual/nixos/stable/#sec-upgrading08:20:44
@toddt:matrix.orgTodd ThompsonThanks, will do08:22:59
@toddt:matrix.orgTodd Thompsonnix-channel --add https://channels.nixos.org/nixos-24.05 nixos08:25:29
@toddt:matrix.orgTodd Thompsonnixos-rebuild switch --upgrade08:25:47
@toddt:matrix.orgTodd Thompsoncaused lots of errors...08:25:58
@toddt:matrix.orgTodd Thompson

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error:
… <borked>

     at «none»:0: (source not available)

   … while calling the 'import' builtin

     at «string»:1:6:

        1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
         |      ^

   (stack trace truncated; use '--show-trace' to show the full trace)

   error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at «none»:0: (source not available)

building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at «none»:0: (source not available)

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at «none»:0: (source not available)

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)

08:26:57
@toddt:matrix.orgTodd Thompson

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at «none»:0: (source not available)

building the system configuration...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

   at «none»:0: (source not available)
08:27:22
@k900:0upti.meK900 You want --upgrade-all 08:30:07
@k900:0upti.meK900And you want to run all of that as root 08:30:13
@toddt:matrix.orgTodd Thompsonran "sudo nix-channel --update" first and then upgrade again, but it failed with...08:31:12
@toddt:matrix.orgTodd Thompson error: package clap v4.5.4 cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.73.0
Either upgrade to rustc 1.74 or newer, or use
cargo update -p clap@4.5.4 --precise ver
where ver is the latest version of clap supporting rustc 1.73.0
error: builder for '/nix/store/vz70pnvz94w0is3vrpkf6yg7kx2q8d9v-nixos-wsl-utils-1.0.0.drv' failed with exit code 101;
last 10 log lines:
> Finished cargoSetupPostPatchHook
> Running phase: updateAutotoolsGnuConfigScriptsPhase
> Running phase: configurePhase
> Running phase: buildPhase
> Executing cargoBuildHook
> ++ env CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu HOST_CC=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc HOST_CXX=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ cargo build -j 16 --target x86_64-unknown-linux-gnu --frozen --profile release
> error: package clap v4.5.4 cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.73.0
> Either upgrade to rustc 1.74 or newer, or use
> cargo update -p clap@4.5.4 --precise ver
> where ver is the latest version of clap supporting rustc 1.73.0
For full logs, run 'nix-store -l /nix/store/vz70pnvz94w0is3vrpkf6yg7kx2q8d9v-nixos-wsl-utils-1.0.0.drv'.
error: 1 dependencies of derivation '/nix/store/ykr6zrnfjbim073hk6sbc35s3hk7anvn-nixos-system-nixos-23.11.7609.5c2ec3a5c2ee.drv' failed to build
08:31:19
@k900:0upti.meK900 Did you run the nix-channel --add command as root? 08:31:46
@k900:0upti.meK900You need to run that as root, otherwise it only affects your user's channels 08:31:57
@toddt:matrix.orgTodd Thompson"sudo nixos-rebuild switch --upgrade-all"?08:31:57
@k900:0upti.meK900 sudo nix-channel --add https://channels.nixos.org/nixos-24.05 nixos first 08:32:27

Show newer messages


Back to Room ListRoom Version: 9