On Tue, Mar 7, 2017 at 5:14 PM, Matthias Beyer <[email protected]> wrote: > On 07-03-2017 16:33:15, Profpatsch wrote: >> On 17-03-07 03:57pm, Matthias Beyer wrote: >> > Hi, >> > >> > is there a way to import an overlay in a default.nix for a nix-shell >> > and use the packages from the overlay in the nix-shell only, without >> > installing the overlay "globally" for my user? >> > >> > If yes, how? >> >> Not sure what you mean, how about just adding the overlay to the default.nix? >> >> import <nixpkgs> { >> overlays: [(self: super: { >> myDep = super.myDep.override { >> … >> }; >> myPkg = self.callPackage ./. {};
nit: super.callPackage, as the super.callPackage *function* already aliases self packages. Otherwise, you would be going twice through the fix-point. >> })]; >> } > > Ah, nice! But I also have to fetch the overlay in the expression... > (I'm trying to get the rust-overlay from mozilla to work) you can import it in the list of overlays. overlays = [ (import ~/nixpkgs-mozilla/rust-overlay.nix) ] -- Nicolas Pierron http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
