Packaging/Quirks and Caveats: Difference between revisions

imported>Lheckemann
imported>Lheckemann
Line 34: Line 34:
Source: [http://stackoverflow.com/questions/43837691/how-to-package-a-single-python-script-with-nix/43837692#43837692 nh2 @ StackOverflow]
Source: [http://stackoverflow.com/questions/43837691/how-to-package-a-single-python-script-with-nix/43837692#43837692 nh2 @ StackOverflow]


A more lightweight alternative is to use <code>nix-shell</code> in the shebang line as described in this [https://gist.github.com/travisbhartwell/f972aab227306edfcfea gist]
A more lightweight alternative is to use <code>nix-shell</code> in the shebang line as described in this [http://iam.travishartwell.net/2015/06/17/nix-shell-shebang/ blog post]. This causes the expression to be evaluated and built every time the script is run; this means that the dependencies will always be kept up to date, but since nix-shell only creates a temporary GC root the dependencies may be removed by a garbage collection, so this approach is not advisable for users who don't have an internet connection available all the time.


== Caveats ==
== Caveats ==