When I download zig_0_15 via “nix-shell -p zig_0_15” everything works, but in flake
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
pkgs = nixpkgs.legacyPackages."x86_64-linux";
in {
devShells."x86_64-linux".default = pkgs.mkShell {
packages = with pkgs; [
zig_0_15
zls
lldb
];
shellHook = ''
echo ""
echo "Zig Dev Env"
echo ""
zig version
echo ""
'';
};
};
}
I get
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|
… while evaluating derivation 'nix-shell'
whose name attribute is located at /nix/store/h2bn031b0fj0ymv9v7bv5rcdjx58y2l9-source/pkgs/stdenv/generic/make-derivation.nix:468:13
… while evaluating attribute 'nativeBuildInputs' of derivation 'nix-shell'
at /nix/store/h2bn031b0fj0ymv9v7bv5rcdjx58y2l9-source/pkgs/stdenv/generic/make-derivation.nix:520:13:
519| depsBuildBuild = elemAt (elemAt dependencies 0) 0;
520| nativeBuildInputs = elemAt (elemAt dependencies 0) 1;
| ^
521| depsBuildTarget = elemAt (elemAt dependencies 0) 2;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: undefined variable 'zig_0_15'
at /nix/store/sinivxfcygi7i1qbss17shmfwka987c8-source/flake.nix:16:9:
15| packages = with pkgs; [
16| zig_0_15
| ^
17| zls
Same thing with ty