[Nix-dev] Suggestion: programs are *always* in the path

Jörg Thalheim joerg at higgsboson.tk
Mon May 1 14:11:21 CEST 2017


Unfortunately the sqlite database feeding command-not-found is almost empty at the moment,

so this command is useless.


On 2017-05-01 12:05, Eelco Dolstra wrote:
> Hi,
>
> On 05/01/2017 11:55 AM, regivanx at 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.
>



More information about the nix-dev mailing list