Share code between scopedImport and import
Share code between scopedImport and import

In addition to reducing duplication, this fixes both import from
derivation and import of derivation for scopedImport

zimbatm/nix,vizanto/nix,dezgeg/nix,offlinehacker/nix,aucampia/nix,dezgeg/nix,ttuegel/nix,jcumming/nix,jcumming/nix,ysangkok/nix,bjornfor/nix,rowhit/nix,dtzWill/nix,rowhit/nix,zimbatm/nix,aucampia/nix,garbas/nix,rycee/nix,ehmry/nix,puffnfresh/nix,peti/nix,wmertens/nix,NixOS/nix,zimbatm/nix,NixOS/nix,NixOS/nix,tchajed/nix,gridaphobe/nix,dtzWill/nix,shlevy/nix,peti/nix,zimbatm/nix,bjornfor/nix,wmertens/nix,gebner/nix,layus/nix,vcunat/nix,rycee/nix,acowley/nix,nbp/nix,bennofs/nix,peti/nix,ysangkok/nix,jcumming/nix,nbp/nix,puffnfresh/nix,gebner/nix,layus/nix,layus/nix,rycee/nix,shlevy/nix,shlevy/nix,gridaphobe/nix,rycee/nix,ehmry/nix,gebner/nix,wmertens/nix,garbas/nix,puffnfresh/nix,ttuegel/nix,puffnfresh/nix,gridaphobe/nix,jcumming/nix,vizanto/nix,tchajed/nix,layus/nix,wmertens/nix,shlevy/nix,garbas/nix,pikajude/nix,gridaphobe/nix,dtzWill/nix,peti/nix,garbas/nix,tchajed/nix,rowhit/nix,acowley/nix,dtzWill/nix,peti/nix,offlinehacker/nix,dtzWill/nix,NixOS/nix,bennofs/nix,aucampia/nix,joelmo/nix,rowhit/nix,dezgeg/nix,ehmry/nix,aucampia/nix,vcunat/nix,dezgeg/nix,ysangkok/nix,bennofs/nix,joelmo/nix,dezgeg/nix,ehmry/nix,acowley/nix,bjornfor/nix,nbp/nix,bennofs/nix,vizanto/nix,tchajed/nix,offlinehacker/nix,garbas/nix,joelmo/nix,joelmo/nix,acowley/nix,shlevy/nix,nbp/nix,pikajude/nix,layus/nix,rycee/nix,ehmry/nix,offlinehacker/nix,vizanto/nix,vcunat/nix,bjornfor/nix,ehmry/nix,NixOS/nix,ttuegel/nix,pikajude/nix,vcunat/nix,ttuegel/nix,gebner/nix