Shiva Purana
धर्मादर्थोऽर्थतो भोगो भोगाद्वैराग्यसंभवः । धर्मार्जितार्थभोगेन वैराग्यमुपजायते ५१ ।
From virtue wealth is derived and from wealth enjoyment. Vairāgya (non-attachment) is the outcome of enjoyment. That is to say, when one fully enjoys the pleasures by means of wealth acquired by virtuous means one comes to the stage of Vairāgya (Detached State).
english translation
dharmAdartho'rthato bhogo bhogAdvairAgyasaMbhavaH । dharmArjitArthabhogena vairAgyamupajAyate 51 ।
hk transliteration by Sanscript