nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 43 lines 1.4 kB view raw
1{ 2 fetchFromGitHub, 3 fetchpatch, 4 lib, 5 postgresql, 6 postgresqlBuildExtension, 7}: 8 9postgresqlBuildExtension { 10 pname = "pg_similarity"; 11 version = "pg_similarity_1_0-unstable-2021-01-12"; 12 13 src = fetchFromGitHub { 14 owner = "eulerto"; 15 repo = "pg_similarity"; 16 rev = "b9cb0a2d501b91e33cd1ef550b05483ca3563f71"; 17 hash = "sha256-L04ANvyfzHgW7fINeJEY6T77Vojq3SI8P1TWiCRSPs0="; 18 }; 19 20 patches = [ 21 (fetchpatch { 22 # https://github.com/eulerto/pg_similarity/pull/43 23 # Also applied in debian as https://sources.debian.org/data/main/p/pg-similarity/1.0-8/debian/patches/pg16 24 name = "pg16.patch"; 25 url = "https://github.com/eulerto/pg_similarity/commit/f7781ea5ace80f697a8249e03e3ce47d4b0f6b2f.patch"; 26 hash = "sha256-MPDvWfNzSg28lXL5u5/Un9pOCJjqJ4Fz9b8XCfalgts="; 27 }) 28 ]; 29 30 makeFlags = [ "USE_PGXS=1" ]; 31 32 meta = { 33 description = "Extension to support similarity queries on PostgreSQL"; 34 longDescription = '' 35 pg_similarity is an extension to support similarity queries on PostgreSQL. The implementation 36 is tightly integrated in the RDBMS in the sense that it defines operators so instead of the traditional 37 operators (= and <>) you can use ~~~ and ~!~ (any of these operators represents a similarity function). 38 ''; 39 platforms = postgresql.meta.platforms; 40 license = lib.licenses.bsd3; 41 maintainers = with lib.maintainers; [ danbst ]; 42 }; 43}