1 { lib, stdenv, fetchFromGitHub, which, squawk }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 hash = "sha256-/HUg6x0il5WxENmgR3slu7nmXTKv6YscjpX569Dztko=";
14 nativeBuildInputs = [ which ];
16 makeFlags = [ "build" "build_shared" ];
19 install -Dm644 -t $out/lib libpg_query.a
20 install -Dm644 -t $out/include pg_query.h
21 install -Dm644 -t $out/lib libpg_query${stdenv.hostPlatform.extensions.sharedLibrary}
32 homepage = "https://github.com/pganalyze/libpg_query";
33 description = "C library for accessing the PostgreSQL parser outside of the server environment";
34 changelog = "https://github.com/pganalyze/libpg_query/blob/${version}/CHANGELOG.md";
35 license = licenses.bsd3;
36 platforms = platforms.unix;
37 maintainers = [ maintainers.marsam ];