Let's do the version checking in Ruby instead, something like:

```ruby
satisfy do
  return false unless which 'lua'
  `lua -v 2>&1`.match /(\d\.\d\.\d+)/
  return false unless $1
  # do something to verify that there's a compatible version here, I don't know which lua versions gnuplot supports
end
```

You'll also need to add `env :std` to the formula to ensure that non-dependency luas get picked up.