postgresqlPackages.pg_rational: init at 0.0.2 (#124257)

master
Chronos 2021-05-26 04:07:33 +02:00 committed by GitHub
parent 69f5a9460c
commit 890e8a8e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,39 @@
{ stdenv
, fetchFromGitHub
, lib
, postgresql
}:
stdenv.mkDerivation rec {
pname = "pg_rational";
version = "0.0.2";
src = fetchFromGitHub {
owner = "begriffs";
repo = "pg_rational";
rev = "v${version}";
sha256 = "sha256-Sp5wuX2nP3KGyWw7MFa11rI1CPIKIWBt8nvBSsASIEw=";
};
buildInputs = [ postgresql ];
installPhase = ''
runHook preInstall
mkdir -p $out/{lib,share/postgresql/extension}
cp *.so $out/lib
cp *.sql $out/share/postgresql/extension
cp *.control $out/share/postgresql/extension
runHook postInstall
'';
meta = with lib; {
description = "Precise fractional arithmetic for PostgreSQL";
homepage = "https://github.com/begriffs/pg_rational";
maintainers = with maintainers; [ netcrns ];
platforms = postgresql.meta.platforms;
license = licenses.mit;
};
}

View File

@ -14,6 +14,8 @@ self: super: {
pg_ed25519 = super.callPackage ./ext/pg_ed25519.nix { };
pg_rational = super.callPackage ./ext/pg_rational.nix { };
pg_repack = super.callPackage ./ext/pg_repack.nix { };
pg_similarity = super.callPackage ./ext/pg_similarity.nix { };