I am getting this every time I run the program

How do I get rid of this text that appears in the console when I run the program?

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
evaluating file '/home/runner/Practice-2/replit.nix'
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/4va5hjb3sdk8pnpn3dsnkdg65fw28jgv-nixpkgs-23.05-src/pkgs/stdenv/generic/make-derivation.nix:350:7:

          349|       depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;
          350|       buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;
             |       ^
          351|       depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;

       error: Dependency is not of a valid type: element 1 of buildInputs for nix-shell

The program still works though.

Repl link/Link to where the bug appears:

Try deleting replit.nix. Your repl uses the new version of the .replit file which includes the nix information. I forked it and deleting replit.nix worked for me.

You'll have to show hidden files to find it, click here to see how

Simply click the 3 dots then “Show hidden files”. :slight_smile:


@Hadl4 Welcome to the forums!
In your replit.nix file, change it from:

{ pkgs }: {
  deps = [


{ pkgs }: {
  deps = [

Here, we removed the unnecessary nix package that you don’t need (it should be empty).
Hope this helps!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.