In my current config i am using llvm15 from rrbutani via: llvm15 = import (builtins.fetchTarball "https://github.com/rrbutani/nixpkgs/tarball/feature/llvm-15") { config = config.nixpkgs.config; };
now i am trying to put my config into a flake and i get an error message error: in pure evaluation mode, 'fetchTarball' requires a 'sha256' argument
i am using this for overriding my mesa packages with hardware.opengl.package = (pkgs.mesa.override { llvmPackages = llvm15.llvmPackages_15; enableOpenCL = false; }).drivers;
As the message says, you need to specify a hash. You can specify a bad hash (I think "" works), and nix will tell you what hash it actually got when it errors out. Then you use that.
However if this is an input that will update with time, better to use a flake input instead.
this worked, thank you very much … now it seems i have to use --impure for the rebuild … it is because of i am fetching a tarball in my configuration.nix ?
building the system configuration...
error: attribute 'currentSystem' missing
at /nix/store/icnzf03j35lkl6nv2h655vg6bhr6y3ja-source/pkgs/top-level/impure.nix:17:43:
16| # (build, in GNU Autotools parlance) platform.
17| localSystem ? { system = args.system or builtins.currentSystem; }
| ^
18|
(use '--show-trace' to show detailed location information)
You’re importing nixpkgs somewhere without specifying a system value, apparently. Specify it and that should go away. --show-trace may help you find where you’re doing so.