Use the field build-dependsin the file.cabal
build-depends:
cmdargs == 0.10.3
But specifying one exact version is usually not the best idea, so
build-depends:
cmdargs >= 0.8 && < 0.11
indicates the range of valid versions.
And is it okay to distribute my package in Hackage?
Not if you know that it will never be useful to everyone.
, , , . Hackage , , , .