main
 1{
 2  lib,
 3  pkgs,
 4  desktop,
 5  ...
 6}:
 7{
 8  programs = {
 9    nix-ld = {
10      enable = true;
11      # put whatever libraries you think you might need
12      # nix-ld includes a strong sane-default as well
13      # in addition to these
14      libraries =
15        with pkgs;
16        [
17          acl
18          alsa-lib
19          at-spi2-atk
20          at-spi2-core
21          atk
22          attr
23          bzip2
24          cairo
25          curl
26          dbus
27          expat
28          fontconfig
29          freetype
30          fuse3
31          gdk-pixbuf
32          glib
33          glibc
34          icu
35          libdrm
36          libglvnd
37          libnotify
38          libpulseaudio
39          libsecret
40          libsodium
41          libssh
42          libunwind
43          libusb1
44          libuuid
45          libxkbcommon
46          mesa
47          nspr
48          nss
49          openssl
50          pango
51          pipewire
52          systemd
53          stdenv.cc.cc # .lib
54          util-linux
55          zlib
56          zstd
57        ]
58        ++ lib.optionals (builtins.isString desktop) [
59          gtk3
60          libGL
61          libappindicator-gtk3
62          vulkan-loader
63          libx11
64          libxscrnsaver
65          libxcomposite
66          libxcursor
67          libxdamage
68          libxext
69          libxfixes
70          libxi
71          libxrandr
72          libxrender
73          libxtst
74          libxcb
75          libxkbfile
76          libxshmfence
77        ];
78    };
79  };
80}