nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 31 lines 849 B view raw
1{ lib, stdenv, fetchFromGitHub, which }: 2 3stdenv.mkDerivation rec { 4 pname = "libpg_query"; 5 version = "13-2.1.1"; 6 7 src = fetchFromGitHub { 8 owner = "pganalyze"; 9 repo = "libpg_query"; 10 rev = version; 11 sha256 = "sha256-195WNTTdXHHPbQg2Ipwa3v/qPEeAtehvZa2OC1egoFo="; 12 }; 13 14 nativeBuildInputs = [ which ]; 15 16 makeFlags = [ "build" ]; 17 18 installPhase = '' 19 install -Dm644 -t $out/lib libpg_query.a 20 install -Dm644 -t $out/include pg_query.h 21 ''; 22 23 meta = with lib; { 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.x86_64; 29 maintainers = [ maintainers.marsam ]; 30 }; 31}