[Nix-dev] nix-shell with system pkgs
Colin Putney
colin at wiresong.com
Tue Jan 26 17:55:02 CET 2016
On Mon, Jan 25, 2016 at 3:15 PM, Yacine Hmito <yacine.hmito at gmail.com>
wrote:
> So, after this lengthy introduction, these are my questions:
>
> - Is it possible for nix-shell to use pkgs as configured by the system
> instead of evaluating '<nixpkgs>'? Would pointing toward the system's .drv
> file
> help? If so, how should I proceed?
> - If it is not possible (yet ? :P), can someone explain to me why
> myotherpkg
> can't find its dependency? This really doesn't make sense to me.
>
> Thanks to anyone who'll be kind enough to answer, and to anyone how has
> made
> this awesome OS.
>
I'm not sure I understood what you're trying to accomplish, but it sounds
like you ought to be able to just do something like this:
Have nixpkgs in your NIX_PATH point to the unstable channel. Something like
NIX_PATH=nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs-unstable
Then import that in your mypkg.nix file:
let
pkgs = import <nixpkgs> {};
other = pkgs.callPackage ./myotherpkg.nix {};
in pkgs.stdenv.mkDerivation {...}
Finally, invoke your shell using your derivation directly:
> nix-shell mypkg.nix
Hope this helps!
-Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160126/e4e42f2c/attachment.html
More information about the nix-dev
mailing list