github.com/anchore/syft@v1.38.2/cmd/syft/internal/options/nix.go (about)

     1  package options
     2  
     3  import (
     4  	"github.com/anchore/clio"
     5  	"github.com/anchore/syft/syft/pkg/cataloger/nix"
     6  )
     7  
     8  type nixConfig struct {
     9  	CaptureOwnedFiles bool `json:"capture-owned-files" yaml:"capture-owned-files" mapstructure:"capture-owned-files"`
    10  }
    11  
    12  func defaultNixConfig() nixConfig {
    13  	def := nix.DefaultConfig()
    14  	return nixConfig{
    15  		def.CaptureOwnedFiles,
    16  	}
    17  }
    18  
    19  var _ interface {
    20  	clio.FieldDescriber
    21  } = (*nixConfig)(nil)
    22  
    23  func (o *nixConfig) DescribeFields(descriptions clio.FieldDescriptionSet) {
    24  	descriptions.Add(&o.CaptureOwnedFiles, `enumerate all files owned by packages found within Nix store paths`)
    25  }