nix.dev icon indicating copy to clipboard operation
nix.dev copied to clipboard

Issue on page /tutorials/first-steps/declarative-shell.html

Open amrtn30 opened this issue 1 year ago • 1 comments

I have an error when executing

 let
   nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
   pkgs = import nixpkgs { config = {}; overlays = []; };
 in

 pkgs.mkShellNoCC {
   packages = with pkgs; [
     cowsay
     lolcat
   ];

+  GREETING = "Hello, Nix!";
 }

which is

error: syntax error, unexpected '+', expecting INHERIT
       at shell.nix:12:1:
           11|
           12| +  GREETING = "Hello, Nix!";
             | ^
           13|  }

amrtn30 avatar Mar 09 '25 17:03 amrtn30

Thanks, noted. This is a duplicate of https://github.com/NixOS/nix.dev/issues/1016.

fricklerhandwerk avatar Mar 09 '25 17:03 fricklerhandwerk