let pkgs = import ./. {}; inherit (pkgs) lib; toload = { ncurses = [ "formw" "menuw" "panelw" "ncursesw" ]; alsaLib = [ "asound" ]; # glibc = [ "m" "dl" "pthread" "c" "rt" "mvec" ]; pulseaudioLight = [ "pulse" ]; libsndfile = [ "sndfile" ]; flac = [ "FLAC" ]; libvorbis = [ "vorbisenc" "vorbis" ]; libogg = [ "ogg" ]; # dbus_tools = [ "dbus-1" ]; systemd = [ "systemd" ]; # libcap_progs = [ "cap" ]; lz4 = [ "lz4" ]; lzma = [ "lzma" ]; utillinux = [ "mount" "blkid" "uuid" ]; libgcrypt = [ "gcrypt" ]; libgpgerror = [ "gpg-error" ]; openal = [ "openal" ]; }; load = lib.concatMapStringsSep ":" (name: let libs = toload.${name}; pkg = lib.getLib pkgs.${name}; in lib.concatMapStringsSep ":" (lib: "${pkg}/lib/lib${lib}.so") libs ) (lib.attrNames toload); in pkgs.writeScriptBin "MCU" '' #!${pkgs.stdenv.shell} #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib.makeLibraryPath libs} export LD_PRELOAD=${load} ${pkgs.zulu}/bin/java -jar ${./MCU-Bootstrap.jar} ''