1 { lib, stdenv, fetchFromGitHub, which }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-gEkcv/j8ySUYmM9lx1hRF/SmuQMYVHwZAIYOaCQWAFs=";
14 nativeBuildInputs = [ which ];
16 makeFlags = [ "build" ];
19 install -Dm644 -t $out/lib libpg_query.a
20 install -Dm644 -t $out/include pg_query.h
24 homepage = "https://github.com/pganalyze/libpg_query";
25 description = "C library for accessing the PostgreSQL parser outside of the server environment";
26 changelog = "https://github.com/pganalyze/libpg_query/raw/${version}/CHANGELOG.md";
27 license = licenses.bsd3;
28 platforms = platforms.unix;
29 maintainers = [ maintainers.marsam ];