Hello, first of all sorry for my bad english, it’s not my first language. Secondly im pretty new with nix and nixos, and i have been following a video on how to make your own packages, and i cant get it to work. It says to do this:
But then when i rebuild the system it gives me this error:
━ 1 Errors:
┃ error:
┃ … while calling the ‘head’ builtin
┃
┃ at /nix/store/yqy82fn77fy3rv7lpwa9m11w3a2nnqg5-source/lib/attrsets.nix:1575:11:
┃
┃ 1574| || pred here (elemAt values 1) (head values) then
┃ 1575| head values
┃ | ^
┃ 1576| else
┃
┃ … while evaluating the attribute ‘value’
┃
┃ at /nix/store/yqy82fn77fy3rv7lpwa9m11w3a2nnqg5-source/lib/modules.nix:809:9:
┃
┃ 808| in warnDeprecation opt //
┃ 809| { value = builtins.addErrorContext “while evaluating the option `${showOption loc}':” value;
┃ | ^
┃ 810| inherit (res.defsFinal’) highestPrio;
┃
┃ (stack trace truncated; use ‘–show-trace’ to show the full trace)
┃
┃ error: access to absolute path ‘/home/ruby/nixos/packages/golings/default.nix’ is forbidden in pure eval mode (use ‘–impure’ to overri…
┣━━━
┗━ ∑Exited with 1 errors reported by nix at 17:30:22 after 7s
Error:
0: Command exited with status Exited(1)
And i dont know what to do to get it to work. I’ve been searching through the forum, and i think i have to call it from the flake.nix. But im not really sure on how to do it. Sorry if is a silly question. And thanks for answering.