@User: A few years back I added general-purpose LUT devices to XSPICE that allow any standard cell library to be implemented in ngspice; you just need the truth tables. I have scripts in qflow that use a liberty file to look up the function for each cell and generate the corresponding truth table, and writes the corresponding XSPICE circuit using the LUT devices. The script is "spi2xspice" and as long as you have a valid SPICE netlist with the standard cells in it, it will generate a valid XSPICE netlist from it.