 
     addPackage = (name, spec) ->
       spec = '*' if spec is 'latest' or spec is '' #ugh
-      fullNames[name] ?= {}
-      fullNames[name][spec] = true
+      fullNames[name] = spec
       fetcher.fetch name, spec, registry
     if packages instanceof Array
       for pkg in packages

    if pkg.dist.tarball?
      stream.write "\n    tarball = \"#{pkg.dist.tarball}\";"
    stream.write "\n  };"
  finalizePkgs = ->
    stream.end "\n}\n"


    stream.write """
    \n  "#{escapeNixString name}"."#{escapeNixString spec}" = {
        version = "#{escapeNixString pkg.version}";
        dependencies = [
    """
    patchLatest = 'false'
