Lua
From NixOS Wiki
Revision as of 11:04, 6 April 2024 by Maintenance script (talk | contribs) (rollback unauthorized mass edits)
#! nix-shell with lua interpreter
To use a nix-shell shebang with lua you will need to use following structure:
#!/usr/bin/env nix-shell
--[[
#!nix-shell -i lua -p lua
]]
print("this is from lua")
Some background by samueldr[1]:
Two inter-twined fun facts.
- Lua only skips one shebang line.
- nix-shell doesn't require its magic lines to be right after the first line.