Is it possible to derive all the other boolean functions by taking other primitives different of $NAND$? I was reading the TECS book (The Elements of Computing Systems), in the book, we start to build the other logical gates with a single primitive logical gate, the $NAND$ gate. With it, we could easily make the $NOT$ gate, then the $AND$ gate and then the $OR$ gate.
With the $NOT$, $AND$ and $OR$ gates, we could express any truth table through cannonical representation.
The book has the table given below, I was wondering if we could do the same by taking any other boolean function as primitive, I'm quite sure that it's not possible to do with both constant $0$ nor constant $1$. What about the others?


As you noted, it's impossible for the constants to generate all of the boolean functions; the gates which are functions of a single input also can't do it, for equally-obvious reasons (it's impossible to generate the boolean function $f(x,y)=y$ from either $f_1(x,y)=x$ or $f_2(x,y)=\bar{x}$).
OR and AND can't do it either, for a slightly more complicated reason — it's impossible to generate nothing from something!  (More specifically, neither one of them is able to represent negation, and in particular neither one can represent a constant function — this is because any function composed of only ORs and ANDs will always return 0 when its inputs are all-0s and will return 1 when its inputs are all-1s.
XOR is a bit more complicated: it's obviously possible to generate 0 and 1 via XORs, and thus NOT; but the 'parity preserving' nature of XOR makes it impossible to represent $x\wedge y$ with XOR alone.
In fact, it can be shown that NOR and NAND are the only two-input boolean functions which suffice in and of themselves; for more details, have a look at the Wikipedia page on functional completeness.
