Skip to content

Commit

Permalink
pg-semver: init at 0.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
grgi committed Nov 14, 2024
1 parent b63acf9 commit 412c679
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/servers/sql/postgresql/ext/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ self: super: {

pg_net = super.callPackage ./pg_net.nix { };

pg-semver = super.callPackage ./pg-semver.nix { };

pgtap = super.callPackage ./pgtap.nix { };

smlar = super.callPackage ./smlar.nix { };
Expand Down
41 changes: 41 additions & 0 deletions pkgs/servers/sql/postgresql/ext/pg-semver.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ lib
, stdenv
, fetchFromGitHub
, postgresql
, postgresqlTestExtension
, testers
, buildPostgresqlExtension
}:

buildPostgresqlExtension (finalAttrs: {
pname = "pg-semver";
version = "0.40.0";

buildInputs = postgresql.buildInputs;

src = fetchFromGitHub {
owner = "theory";
repo = "pg-semver";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-9f+QuGupjTUK3cQk7DFDrL7MOIwDE9SAUyVZ9RfrdDM=";
};

passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
};
extension = postgresqlTestExtension {
inherit (finalAttrs) finalPackage;
sql = "CREATE EXTENSION semver;";
};
};

meta = with lib; {
description = "Semantic version data type for PostgreSQL";
homepage = "https://github.com/theory/pg-semver";
changelog = "https://github.com/theory/pg-semver/blob/main/Changes";
maintainers = with maintainers; [ grgi ];
inherit (postgresql.meta) platforms;
license = licenses.postgresql;
};
})

0 comments on commit 412c679

Please sign in to comment.