How to install these packages on nix

I made a c++ repl with CMAKE to compile a c++ program with glfw to a .exe program. All works fine when I don’t add the glfw library (used to open a window), but when I add it, replit doesn’t add a vital package named X11. More specifically, I need these libraries :
apt-get install libxss-dev libxxf86vm-dev libxkbfile-dev libxv-dev
But I don’t know how to install them on my repl.
Could anyone help me?
Thank you
Repl link:

1 Like

to add these shared libraries, open replit.nix.
There is a deps variable, but shared libraries go in another spot. Try something like this:

{ pkgs }: {
  deps = [
    # stuff
  env = {
    LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [

To add the packages go to then search the packages that you need. To install you need to click on the package you’d like, then you will see Nix packages, click “NixOS Configuration” and copy the pkgs. and everything after on that line. Paste that in the replit.nix file.

There is an updated way to install nix packages, AKA system dependencies, in replit.
Open the System dependencies tool which manages your nix packages. There, you can view and install packages including shared library packages, so you don’t have to edit replit.nix.
(Note that on some repls, there is no install functionality in System dependencies.)