nixpkgs/pkgs/servers/sql/postgresql/ext/tsearch_extras.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

30 lines
918 B
Nix

{ lib, stdenv, fetchFromGitHub, pkgconfig, postgresql }:
stdenv.mkDerivation {
pname = "tsearch-extras";
version = "0.4";
src = fetchFromGitHub {
owner = "zulip";
repo = "tsearch_extras";
rev = "84e78f00931c4ef261d98197d6b5d94fc141f742"; # no release tag?
sha256 = "18j0saqblg3jhrz38splk173xjwdf32c67ymm18m8n5y94h8d2ba";
};
nativenativeBuildInputs = [ pkgconfig ];
buildInputs = [ postgresql ];
installPhase = ''
install -D tsearch_extras.so -t $out/lib/
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension
'';
meta = with lib; {
description = "Provides a few PostgreSQL functions for a lower-level data full text search";
homepage = "https://github.com/zulip/tsearch_extras/";
license = licenses.postgresql;
platforms = postgresql.meta.platforms;
maintainers = with maintainers; [ DerTim1 ];
};
}