Default version of replit.nix

I have found my own solution to my question found here:-

in response to:-

And in reply to @Firepup650

I simply created a new repl.
I zipped up the existing one and downloaded it.
I reloaded into the new repl, in a new folder.
I deleted unwanted files and slightly reworked the .replit file to reflect the new hierarchy and call into the file I have to test working.

However, the original edited replit.nix is this:-

{ pkgs }: {
  deps = [
    pkgs.source venv/bin/activate
  env = {
    PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
      # Needed for pandas / numpy
      # Needed for pygame
      # Needed for matplotlib
    PYTHONHOME = "${pkgs.python310Full}";
    PYTHONBIN = "${pkgs.python310Full}/bin/python3.10";
    LANG = "en_US.UTF-8";
    STDERREDBIN = "${pkgs.replitPackages.stderred}/bin/stderred";

It would be interesting to understand the differences and why this configuration fails.

I should also add that it seems the original configuration file kept on having packages added to, eg telnet.
I was calling telnet at the command line and receiving the error:-
error: ‘telnet’ has been renamed to/replaced by ‘inetutils’

Using Ghostwriter it suggested:-
sudo apt-get update
sudo apt-get install inetutils-telnet

However, this happened repeatedly, each time it seems a line being added to the replit.nix file (which I then removed).

The line “sudo apt-get install inetutils-telnet”
also return an output telling me that the package is present from several available sources, giving a choice of which to use.
The line appended to replit.nix reflected that choice.

you can’t really use sudo because it needs root access which replit denies to prevent command line injections since their code is run on a VM

1 Like

Yes, Ghostwriter seems to understand the environment less than I do.

Never mind, it is still useful for many things.
It just needs to be treated with some caution, which is a bit of a learning curve in itself.

replace with


(This is what that replaced message meant)

This shouldn’t be here, we can’t use sudo anyways.

Remove this line. (You can’t do this in this file AFAIK)

After making these changes, please provide any new errors Nix returns.


OK, thanks for this.
‘replaced’ OK got it.

No sudo - got it.

Very useful.

@QwertyQwerty88 please mark firepup’s as solved


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