How to insert this dependencies in my config file?

Hi,

This is my config file. It has been mostly working as I expected :slight_smile:

I need to install some dependencies. This is code that I have to introduce:

{ pkgs ? import <nixpkgs> {} } :
with builtins;
let inherit (pkgs) stdenv; in
with pkgs;
stdenv.mkDerivation {
  name = "nyxt-site";

  buildInputs = [
    pkgs.sqlite.out
    pkgs.openssl.out
    pkgs.libfixposix.out
  ];

  propogatedBuildInputs = [
    pkgs.sqlite.out
    pkgs.openssl.out
    pkgs.libfixposix.out
  ];

  LD_LIBRARY_PATH = with stdenv.lib; "${makeLibraryPath [ pkgs.sqlite.out
                                                          pkgs.openssl.out
                                                          pkgs.libfixposix.out ]};";

}


However, I do not know how/where to insert this piece of code in my config file without breaking things.

Any suggestion?

Thanks in advance!

Put it in a file next to your configuration.nix. Then you can add it here like so to install it as a package:

(import ./filename.nix { inherit pkgs; })

That said, this doesn’t really look like a package - what is it supposed to do, and why do you want to add it to your config? Maybe there’s a better place.

also messing with LD_LIBRARY_PATH is a bit like crossing the streams in ghost busters, exciting, but can be ‘bad’.

Egon Spengler:
There’s something very important I forgot to tell you.

Peter Venkman:
What?

Spengler:
Don’t set LD_LIBRARY_PATH

Venkman:
Why?

Spengler:
It would be bad.

Venkman:
I’m fuzzy on the whole good/bad thing. What do you mean, “bad”?

Spengler:
Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light.

Ray Stantz:
Total protonic reversal.

Venkman:
Right. That’s bad. Okay. All right. Important safety tip. Thanks, Egon.