Hi, On 05/01/2017 11:55 AM, regiv...@gmail.com wrote:
> If you enter a command, you want to run it. > > If the corresponding program is not installed, the command is a symbolic link > to > a script that says: > > _ download the program and its dependencies, > _ install it, > _ run it. On NixOS, you can already do something like that by setting $NIX_AUTO_RUN to 1. E.g. $ export NIX_AUTO_RUN=1 $ gphoto2 --version these paths will be fetched (1.44 MiB download, 8.20 MiB unpacked): /nix/store/3a7xm6l9ysvf6igk9g9nsc0w9kxpscb0-libgphoto2-2.5.12 /nix/store/7fhspkpiylqi4lifqn6k2lvjhkw1llsv-gphoto2-2.5.8 ... gphoto2 2.5.8 This only works if the programs database /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite exists. Also it doesn't work if a command has multiple alternatives. -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/ _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl https://mailman.science.uu.nl/mailman/listinfo/nix-dev