Change:
<ins> # mostly copied from ./timescaledb.nix which was copied from ./postgresql.nix # as it seemed unapproriate to test additional extensions for postgresql there. { system ? builtins.currentSystem , config ? { } , pkgs ? import ../.. { inherit system config; } }: with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let postgresql-versions = import ../../pkgs/servers/sql/postgresql pkgs; # Test cases from https://docs.pgvecto.rs/use-cases/hybrid-search.html test-sql = pkgs.writeText "postgresql-test" '' CREATE EXTENSION vectors; CREATE TABLE items ( id bigserial PRIMARY KEY, content text NOT NULL, embedding vectors.vector(3) NOT NULL -- 3 dimensions ); INSERT INTO items (content, embedding) VALUES ('a fat cat sat on a mat and ate a fat rat', '[1, 2, 3]'), ('a fat dog sat on a mat and ate a fat rat', '[4, 5, 6]'), ('a thin cat sat on a mat and ate a thin rat', '[7, 8, 9]'), ('a thin dog sat on a mat and ate a thin rat', '[10, 11, 12]'); ''; make-postgresql-test = postgresql-name: postgresql-package: makeTest { name = postgresql-name; meta = with pkgs.lib.maintainers; { maintainers = [ diogotcorreia ]; }; nodes.machine = { ... }: { services.postgresql = { enable = true; package = postgresql-package; extraPlugins = ps: with ps; [ pgvecto-rs ]; settings.shared_preload_libraries = "vectors"; }; }; testScript = '' def check_count(statement, lines): return 'test $(sudo -u postgres psql postgres -tAc "{}"|wc -l) -eq {}'.format( statement, lines ) machine.start() machine.wait_for_unit("postgresql") with subtest("Postgresql with extension vectors is available just after unit start"): machine.succeed(check_count("SELECT * FROM pg_available_extensions WHERE name = 'vectors' AND default_version = '${postgresql-package.pkgs.pgvecto-rs.version}';", 1)) machine.succeed("sudo -u postgres psql -f ${test-sql}") machine.succeed(check_count("SELECT content, embedding FROM items WHERE to_tsvector('english', content) @@ 'cat & rat'::tsquery;", 2)) machine.shutdown() ''; }; applicablePostgresqlVersions = filterAttrs (_: value: versionAtLeast value.version "12") postgresql-versions; in mapAttrs' (name: package: { inherit name; value = make-postgresql-test name package; }) applicablePostgresqlVersions </ins>

Discussion:
Project description Scalable Vector database plugin for Postgres, written in Rust, specifically designed for LLM Immich 1.91 requires this extension for it's PostreSQL database. Metadata homepage URL: source URL: license: asl20 platforms: unix, linux, darwin, ... Add a :+1: [reaction] to [issues you find important]. [reaction]: [issues you find important]:
While it doesn't build from source, I've come across this derivation of which packages the appropriate binary release:
thanks for that link! That should get me going for now until a native package can be to nixpkgs.
Did anyone get this working? I'm quite new to Nix and haven't got a clue where to start with installing a custom package.
Hi Yes, I've got it working , and presumably has as well (whose dotfiles repo I linked to). Typically to include a custom nix package in your config, you merge it into the upstream nixpkgs that your config is already pulling from by using . I do this in my config - my file is just a big function with arguments (aka an overlay). I then (so is now an overlay) and then pass that in the list when instantiating nixpkgs. ( is ). does things a bit differently. They have which is a function with arguments , which returns a derivation (created via ). This then has before that overlay is finally . So in short, you have a package derivation (either the output of or (or other functions)). You need to get it into an overlay function, then pass that overlay function when creating your instance of nixpkgs. I appreciate this is not simple :) Ideally someone can PR this to nixpkgs to make this easier for everyone (though we should really get building it from source working first). I learned myself by piecing together bits of other user's configs. If you want more fine-grained help, check out .
If no one else picks this up in the next few days I might give it a shot if I have time, but as I said in my comment this would need to be packaged as well. Thanks for the amazing explanation above!
is already packaged. One problem that I ran into is that cargo-pgrx is built with rust-stable while seems to need to be built with rust-nightly.

you can see how I got working in my .
Hey! I've just managed to package version (and it took me way too long)! Unfortunately, I was getting a weird linker error on , so I went straight for the beta instead. I'll be keeping an eye for when it releases as a stable version (i.e., ). I have to say that I have not tested it in Immich yet, but it builds and enables correctly on PostgreSQL. With that said, I'll be submitting a draft PR shortly, so that I can start getting reviews. Thank you for telling me about , that helped a lot. I got around the rust nightly limitation by using the env variable and a few patches.
Do you have a link to your repo? I had tried with using the previous methods and it broke my immich. I had to revert to an older database backup to recover and installing (the one that is used by the docker-compose file) and then it worked.
That's not good news :sob: I do have my repo at , but I have not pushed yet. This issue seems to indicate that this will be temporary and they plan to upgrade to a newer version when it's more stable:
Hey! I've (almost) finished the PR to add 0.2.0 (which will be the targeted version in the next version of Immich, see ). I have left some comments about stuff I'm not certain about, so if you have the knowledge to do so, I'd appreciate if you could go there and leave a review! Thank you!