NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.49k stars 12.99k forks source link

nixUnstable deprecation #323711

Open ddanon opened 6 days ago

ddanon commented 6 days ago

Problem

I am getting build errors related to the updated verbiage around nixUnstable to nixVersions.{git || latest}. The behavior is the same regardless of if I add the --impure option.

[~/.config/home-manager]$ home-manager switch --flake .
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:9:12:
            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating derivation 'home-manager-generation'
         whose name attribute is located at /nix/store/4p0avw1s3vf27hspgqsrqs37gxk4i83i-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildCommand' of derivation 'home-manager-generation'
         at /nix/store/4p0avw1s3vf27hspgqsrqs37gxk4i83i-source/pkgs/build-support/trivial-builders/default.nix:68:17:
           67|         enableParallelBuilding = true;
           68|         inherit buildCommand name;
             |                 ^
           69|         passAsFile = [ "buildCommand" ]

       … while evaluating the option `home.activation.installPackages.data':

       … while evaluating definitions from `/nix/store/nkqf0vw9vwsjqac6i2zdg0581s75ih9j-source/modules/home-environment.nix':

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

       error: nixUnstable has been removed. For bleeding edge (Nix master, roughly weekly updated) use nixVersions.git, otherwise use nixVersions.latest.

The closest thing I could find to a solution were from reddit or issue #310615. The recommended action basically boils down to this:

# home.nix

# previously no mention of nix.package
# home.nix

# now added this line to my home.nix file
nix.package = pkgs.nixVersions.latest

Unfortunately this did not resolve the issue.

Proposal

Add a wiki page documenting the behavior of the default value and explain why it must be set. Once I get this resolved I'll happily write it myself!

Checklist


Add a :+1: reaction to issues you find important.

eclairevoyant commented 6 days ago

Please provide your config, or an MWE. nixVersions.latest is meant to be the replacement in general. Unfortunately it's unclear how you're using it in your config.

jtojnar commented 6 days ago

This is either issue with your config, in which case you should just replace the nixUnstable attribute, or with one of your flake inputs, in which case you should get them to fix it/update them. Either way, it is not a Nixpkgs bug.

Try checking if you have nixUnstable anywhere in your flake or sources of your flake input. Also please run the command with --show-trace as suggested by the error message for more info.