Closed TheOPtimal closed 2 years ago
the message says that one of your package is not of type package. Do you by any chance override the neovim package somewhere ? it should be doable to bisect (with git or not).
NB: you can now add type = "lua";
to
{
plugin = syntaxcomplete;
config = builtins.readFile ./pluginConfig/syntaxcomplete.vim;
}
then you dont need heredoc syntax and can just source the generated lua file.
The issue is that the generated package (which is the one added to the environment, not the user provided package) fails to generate.
See https://github.com/nix-community/home-manager/blob/882bd8118bdbff3a6e53e5ced393932b351ce2f6/modules/programs/neovim.nix#L387-L387 https://github.com/nix-community/home-manager/blob/882bd8118bdbff3a6e53e5ced393932b351ce2f6/modules/programs/neovim.nix#L405-L411
The error happens in wrapNeovimUnstable
where it probably returns null
or an expression that is not a derivation.
the message says that one of your package is not of type package. Do you by any chance override the neovim package somewhere ? it should be doable to bisect (with git or not).
NB: you can now add
type = "lua";
to{ plugin = syntaxcomplete; config = builtins.readFile ./pluginConfig/syntaxcomplete.vim; }
then you dont need heredoc syntax and can just source the generated lua file.
Thing is, bisect wouldn't work because my config has been broken for a while.
The issue is that the generated package (which is the one added to the environment, not the user provided package) fails to generate.
See
The error happens in
wrapNeovimUnstable
where it probably returnsnull
or an expression that is not a derivation.
How do I find out what's causing that?
Thing is, bisect wouldn't work because my config has been broken for a while.
git bisect
is log n so it looks tractable but I didn't necessarily mean git bisect but just commenting out nix code in your neovim/module.nix
also EDITOR = "${config.programs.neovim.package}/bin/nvim";
should probably be EDITOR = "${config.programs.neovim.finalPackage}/bin/nvim";
the message says that one of your package is not of type package. Do you by any chance override the neovim package somewhere ? it should be doable to bisect (with git or not). NB: you can now add
type = "lua";
to{ plugin = syntaxcomplete; config = builtins.readFile ./pluginConfig/syntaxcomplete.vim; }
then you dont need heredoc syntax and can just source the generated lua file.
Thing is, bisect wouldn't work because my config has been broken for a while.
Sorry there's no action to take on your side, my comment was directed to @teto but I did not address them directly initially.
What do I do? My NixOS system has gotten very out of date
have you tried to comment out some of neovim config to see what triggers the error ?
have you tried to comment out some of neovim config to see what triggers the error ?
Yes, tried to comment out a bunch of packages. None of them made a difference
I mean starting from
programs.neovim = {
enable = true;
}
# Set neovim as the default editor
home.sessionVariables = rec {
};
and then uncommenting little by little to know which parts raise the error.
Just figured out the issue, I am an IDIOT. Instead of putting module.nix in imports
, I accidentally put it in home.packages
. Sorry for wasting your time, I feel like I should've figured that out earlier
@TheOPtimal I'm running into this also. It happens when I add rust
to home.packages (here). The command I'm running is:
nix run nix-darwin -- switch --flake .#LIGO
And the error is
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'darwin-system-24.05.20231129.e92039b+darwin4.4b9b83d'
whose name attribute is located at /nix/store/cjvwy2rr87ir1nb6wvs9n6lvbnzlqrdg-source/pkgs/stdenv/generic/make-derivation.nix:348:7
… while evaluating attribute 'activationScript' of derivation 'darwin-system-24.05.20231129.e92039b+darwin4.4b9b83d'
at /nix/store/wki8fh5iv47w07xpw1ly5xliz6bdbh26-source/modules/system/default.nix:95:7:
94|
95| activationScript = cfg.activationScripts.script.text;
| ^
96| activationUserScript = cfg.activationScripts.userScript.text;
… while calling 'g'
...
at /nix/store/cjvwy2rr87ir1nb6wvs9n6lvbnzlqrdg-source/lib/types.nix:511:14:
510| merge = loc: defs:
511| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
512| imap1 (m: def':
error: A definition for option `home-manager.users.matt.home.packages."[definition 13-entry 1]"' is not of type `package'. Definition values:
- In `/nix/store/afabzcsliqdq0njcw8h1b4rpxvybm7fg-source/home-manager/rust.nix':
{
IsNoStdTarget = <function>;
envVars = {
ccForBuild = "/nix/store/dgmdis15d7s7vlkfkz5w5b2wnna2syfz-clang-wrapper-16.0.6/bin/cc";
ccForHost = "/nix/store/dgmdis15d7s7vlkfkz5w5b2wnna2syfz-clang-wrapper-16.0.6/bin/cc";
...
Any ideas?
@MatrixManAtYrService Unfortunately, the rust attribute is not actually a package, which certainly can be a bit confusing. You'll want to include pkgs.rustc
and pkgs.cargo
, instead. Have a look at the documentation for Nixpkgs: https://nixos.org/manual/nixpkgs/unstable/#rust
Is there an existing issue for this?
Issue description
I have been trying to fix this goddamn issue for 2 weeks. Nothing worked. I'm all out of ideas, my Nix system is out of dated and I'm seriously considering wiping everything and just installing Fedora.
I'm using Home Manager inside of NixOS with the home-manager flake module. Here is the error log that occurs when I try to run
nixos-rebuild
:Here is neovim/module.nix
Maintainer CC
No response
System information