Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 32 lines 938 B view raw
1{ lib, stdenv, fetchFromGitHub, postgresql }: 2 3stdenv.mkDerivation rec { 4 pname = "pg_hint_plan"; 5 version = "14-1.4.0"; 6 7 src = fetchFromGitHub { 8 owner = "ossc-db"; 9 repo = pname; 10 rev = "REL${builtins.replaceStrings ["-" "."] ["_" "_"] version}"; 11 sha256 = "sha256-2hYDn/69264x2lMRVIp/I5chjocL6UqIw5ry1qdRcDM="; 12 }; 13 14 buildInputs = [ postgresql ]; 15 16 installPhase = '' 17 mkdir -p $out/{lib,share/postgresql/extension} 18 19 cp *.so $out/lib 20 cp *.sql $out/share/postgresql/extension 21 cp *.control $out/share/postgresql/extension 22 ''; 23 24 meta = with lib; { 25 description = "Extension to tweak PostgreSQL execution plans using so-called 'hints' in SQL comments"; 26 homepage = "https://github.com/ossc-db/pg_hint_plan"; 27 maintainers = with maintainers; [ _1000101 ]; 28 platforms = postgresql.meta.platforms; 29 license = licenses.bsd3; 30 broken = versionOlder postgresql.version "14"; 31 }; 32}