nixpkgs/home/packages/sqlformat/default.nix
Daniel Siepmann 21573b25f5
Ease writeShellApplication calls
Provide proper runtimeInputs instead of using nix variables all the
time.
2022-05-31 18:54:47 +02:00

22 lines
351 B
Nix

{
writeShellApplication,
python3
}:
let
python = python3.withPackages(python-packages: with python-packages; [
sqlparse
]);
in writeShellApplication {
name = "sqlformat";
runtimeInputs = [
python
];
text = ''
python3 -m sqlparse --keywords upper --identifiers lower --reindent_aligned --indent_width 4 <(cat -)
'';
}