Living cells display a remarkable capacity to compartmentalize their functional biochemistry. A particularly fascinating example is the cell nucleus. Exchange of macromolecules between the nucleus and the surrounding cytoplasm does not involve traversing a lipid bilayer membrane. Instead, large protein channels known as nuclear pores cross the nuclear envelope and regulate the passage of other proteins and RNA molecules. Beyond simply gating diffusion, the system of nuclear pores and associated transport receptors is able to generate substantial concentration gradients, at the energetic expense of guanosine triphosphate (GTP) hydrolysis. In contrast to conventional approaches to demixing such as reverse osmosis or dialysis, the biological system operates continuously, without application of cyclic changes in pressure or solvent exchange. Abstracting the biological paradigm, we examine this transport system as a thermodynamic machine of solution demixing. Building on the construct of free energy transduction and biochemical kinetics, we find conditions for stable operation and optimization of the concentration gradients as a function of dissipation in the form of entropy production.