at 22.05-pre 39 lines 870 B view raw
1{ stdenv 2, fetchFromGitHub 3, lib 4, postgresql 5}: 6 7stdenv.mkDerivation rec { 8 pname = "pg_rational"; 9 version = "0.0.2"; 10 11 src = fetchFromGitHub { 12 owner = "begriffs"; 13 repo = "pg_rational"; 14 rev = "v${version}"; 15 sha256 = "sha256-Sp5wuX2nP3KGyWw7MFa11rI1CPIKIWBt8nvBSsASIEw="; 16 }; 17 18 buildInputs = [ postgresql ]; 19 20 installPhase = '' 21 runHook preInstall 22 23 mkdir -p $out/{lib,share/postgresql/extension} 24 25 cp *.so $out/lib 26 cp *.sql $out/share/postgresql/extension 27 cp *.control $out/share/postgresql/extension 28 29 runHook postInstall 30 ''; 31 32 meta = with lib; { 33 description = "Precise fractional arithmetic for PostgreSQL"; 34 homepage = "https://github.com/begriffs/pg_rational"; 35 maintainers = with maintainers; [ netcrns ]; 36 platforms = postgresql.meta.platforms; 37 license = licenses.mit; 38 }; 39}