How to fix "library is missing or cannot be opened: "libcrypto.so.1.1""

Context: I’m trying to use mongodb-memory-server nodejs package (see Add Support for NixOS · Issue #782 · nodkz/mongodb-memory-server · GitHub). When running trying to use it I get the error Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1"

I’m adding some packages to the LD_LIBRARY_PATH, but cannot figure out which one for libcrypto.so.1.1

''
    export LD_LIBRARY_PATH="${
      lib.makeLibraryPath
      (with pkgs; [ stdenv.cc.cc openssl libGL libuuid curlFull ])
    }:$LD_LIBRARY_PATH"
''

openssl is OpenSSL 3.0. libcrypto.so.1.1 is provided by OpenSSL 1.1, so you need to use openssl_1_1. Note that OpenSSL 1.1 is marked insecure in NixOS 23.05 because it will go out of support in September (during the 23.05 lifecycle).