pg_relusage icon indicating copy to clipboard operation
pg_relusage copied to clipboard

Packaged for nixpkgs

Open thenonameguy opened this issue 3 years ago • 2 comments

Hi!

I found this extension really cool, so I packaged it for easy installation via the Nix package manager: https://github.com/NixOS/nixpkgs/pull/198073 waiting for it to be merged

Now it's this easy to include in any application:

           (pkgs.postgresql_13.withPackages
-            (p: [ p.pg_cron p.plpgsql_check p.pg_partman ]))
+            (p: [ p.pg_cron p.plpgsql_check p.pg_partman p.pg_relusage ]))

You can try it out here:

➜  ~ nix build --impure --expr 'with builtins.getFlake "github:thenonameguy/nixpkgs/pg_relusage"; with legacyPackages.${builtins.currentSystem}; postgresql_13.withPackages (p: [ p.pg_relusage ])'

➜  ~ fd relusage ./result
./result/lib/pg_relusage.so
./result/share/postgresql/extension/pg_relusage--0.0.1.sql
./result/share/postgresql/extension/pg_relusage.control

Feel free to mention this in your README.md once it gets mainlined.

thenonameguy avatar Oct 27 '22 15:10 thenonameguy

My knowledge about nix is pretty minimal. Is the above ("nix build ...") the snippet that is supposed to go into the README? if you can make PR for the README, it would be greatly appreciated

adept avatar Oct 27 '22 20:10 adept

Yes, I will gladly open a PR for that. Just wanted to put this on your radar. The current build instruction is a very hacky one-liner to try out the extension with the latest supported PG major versions on my branch. Just for nixers who happen to stumble upon this.

I'll mark the PR to fix this issue when the package gets accepted to the main Nix package repository.

thenonameguy avatar Oct 27 '22 20:10 thenonameguy