It's an application, not a library/module.
[Bjørn: * buildInputs -> propagatedBuildInputs, so pyserial is found at runtime * whitespace fix (add missing whitespace inside curly bracket) ]