Each academic discipline creates and uses primary and secondary sources differently. The definition of a primary source only makes sense in the context of a specific discipline or field of inquiry.
Here are two definitions that try to capture the elusive nature of primary documents.
A definition from Cornell University: "Primary sources are the main text or work that you are discussing (e.g. a sonnet by William Shakespeare; an opera by Mozart);
actual data or research results (e.g. a scientific article presenting original findings; statistics);
or historical documents (e.g. letters, pamphlets, political tracts, manifestoes)."
["What is a Source?" Recognizing and Avoiding Plagiarism. Cornell University. College of Arts and Sciences.]
A definition from Yale University: "A primary source is firsthand testimony or direct evidence concerning a topic under investigation. The nature and value of a source cannot be determined without reference to the topic and questions it is meant to answer. The same document, or other piece of evidence, may be a primary source in one investigation and secondary in another. The search for primary sources does not, therefore, automatically include or exclude any category of records or documents."
[Yale University Library. Primary Sources Research Colloquium in History.]