Files
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

52 lines
984 B
Nix

{
lib,
stdenvNoCC,
fetchFromGitHub,
coreutils,
gnused,
postgresql,
makeWrapper,
}:
stdenvNoCC.mkDerivation rec {
pname = "psql2csv";
version = "0.12";
src = fetchFromGitHub {
owner = "fphilipe";
repo = "psql2csv";
rev = "v${version}";
hash = "sha256-XIdZ2+Jlw2JLn4KXD9h3+xXymu4FhibAfp5uGGkVwLQ=";
};
nativeBuildInputs = [ makeWrapper ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin psql2csv
wrapProgram $out/bin/psql2csv \
--prefix PATH : ${
lib.makeBinPath [
coreutils
gnused
postgresql
]
}
runHook postInstall
'';
meta = {
description = "Tool to run a PostreSQL query and output the result as CSV";
homepage = "https://github.com/fphilipe/psql2csv";
license = lib.licenses.mit;
maintainers = [ ];
inherit (postgresql.meta) platforms;
mainProgram = "psql2csv";
};
}