       console.error "Each package must have a name, but #{JSON.stringify pkg} doesn't"
       process.exit 5
     range = pkg.range ? "*"
+    fullNames["#{pkg.name}-#{range}"] = true
     generatePackage pkg.name, range, generateCallback

                fullName = \"#{escapeNixString fullName}\";
                hash = \"#{escapeNixString pkg.hash.toString 'hex'}\";
                patchLatest = #{if pkg.patchLatest then 'true' else 'false'};
                dependencies = [
          """
          for nm, rng of pkg.dependencies


escapeNixString = (string) ->
  string.replace /(\\|\$\{|")/g, "\\$&"

fullNames = {}

fs.readFile file, (err, json) ->
  if err?
