diff options
Diffstat (limited to 'pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix')
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix b/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix new file mode 100644 index 00000000000..6daa5e0cf0e --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/pg_uuidv7.nix @@ -0,0 +1,34 @@ +{ lib +, stdenv +, fetchFromGitHub +, postgresql +}: + +stdenv.mkDerivation rec { + pname = "pg_uuidv7"; + version = "1.3.0"; + + buildInputs = [ postgresql ]; + + src = fetchFromGitHub { + owner = "fboulnois"; + repo = "pg_uuidv7"; + rev = "v${version}"; + hash = "sha256-kHxS9tL7fpKhjJ8Xx5tee1fv10zVcTt2FgUQSaRdNZo="; + }; + + installPhase = '' + install -D -t $out/lib pg_uuidv7${postgresql.dlSuffix} + install -D {sql/pg_uuidv7--${lib.versions.majorMinor version}.sql,pg_uuidv7.control} -t $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "A tiny Postgres extension to create version 7 UUIDs"; + homepage = "https://github.com/fboulnois/pg_uuidv7"; + changelog = "https://github.com/fboulnois/pg_uuidv7/blob/main/CHANGELOG.md"; + maintainers = with maintainers; [ gaelreyrol ]; + platforms = postgresql.meta.platforms; + license = licenses.mpl20; + broken = versionOlder postgresql.version "13"; + }; +} |