This package is currently a work in progress. It works without issue since it is used in several of the integration tests, but the API is not really ready for public consumption as it has simply been refactored out of the main codebase for now.
$ go get -u github.com/btcsuite/btcd/mining/cpuminer
Package cpuminer is licensed under the copyfree ISC License.