Hacker News new | ask | show | jobs
by chriswarbo 4023 days ago
> nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies. For example, here is a Haskell script that, when invoked, first downloads GHC and the Haskell packages on which it depends:

Wow, that sounds super useful! I'm finding more and more default.nix and shell.nix files scattered through my hard drive, along with wrapper scripts for invoking nix-shells.

I can probably replace a lot of these with appropriate shebangs :)

1 comments

This is a great idea. It would be cool if Docker supported something like this.