From 511b0843c746d6aea287e16d6e2c6bd35e592998 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 26 Nov 2024 22:15:03 +0100 Subject: [PATCH] postgresqlPackages.pg-gvm: move from top-level package This is a PostgreSQL extension, which only works properly when made available in the postgresql.pkgs package set. --- pkgs/servers/sql/postgresql/ext/default.nix | 2 ++ .../sql/postgresql/ext/pg-gvm.nix} | 22 +++++-------------- pkgs/top-level/aliases.nix | 1 + 3 files changed, 9 insertions(+), 16 deletions(-) rename pkgs/{by-name/pg/pg-gvm/package.nix => servers/sql/postgresql/ext/pg-gvm.nix} (74%) diff --git a/pkgs/servers/sql/postgresql/ext/default.nix b/pkgs/servers/sql/postgresql/ext/default.nix index 30cd54914119..4df9052ebb9a 100644 --- a/pkgs/servers/sql/postgresql/ext/default.nix +++ b/pkgs/servers/sql/postgresql/ext/default.nix @@ -72,6 +72,8 @@ in { pg_net = super.callPackage ./pg_net.nix { }; + pg-gvm = super.callPackage ./pg-gvm.nix { }; + pg-semver = super.callPackage ./pg-semver.nix { }; pgtap = super.callPackage ./pgtap.nix { }; diff --git a/pkgs/by-name/pg/pg-gvm/package.nix b/pkgs/servers/sql/postgresql/ext/pg-gvm.nix similarity index 74% rename from pkgs/by-name/pg/pg-gvm/package.nix rename to pkgs/servers/sql/postgresql/ext/pg-gvm.nix index dca83ea0bdd6..249300584112 100644 --- a/pkgs/by-name/pg/pg-gvm/package.nix +++ b/pkgs/servers/sql/postgresql/ext/pg-gvm.nix @@ -1,4 +1,5 @@ { + buildPostgresqlExtension, cmake, fetchFromGitHub, glib, @@ -9,31 +10,21 @@ pcre2, pkg-config, postgresql, - stdenv, }: -stdenv.mkDerivation rec { +buildPostgresqlExtension (finalAttrs: { pname = "pg-gvm"; version = "22.6.5"; src = fetchFromGitHub { owner = "greenbone"; repo = "pg-gvm"; - rev = "refs/tags/v${version}"; + rev = "refs/tags/v${finalAttrs.version}"; hash = "sha256-19ZmQdLjfwJwOMoO16rKJYKOnRyt7SQOdkYTxt8WQ2A="; }; strictDeps = true; - configurePhase = '' - runHook preConfigure - - cmake \ - -DCMAKE_INSTALL_DEV_PREFIX=$out . - - runHook postConfigure - ''; - nativeBuildInputs = [ cmake pkg-config @@ -46,16 +37,15 @@ stdenv.mkDerivation rec { icu libical pcre2 - postgresql ]; meta = { description = "Greenbone Library for helper functions in PostgreSQL"; homepage = "https://github.com/greenbone/pg-gvm"; - changelog = "https://github.com/greenbone/pg-gvm/releases/tag/v${version}"; + changelog = "https://github.com/greenbone/pg-gvm/releases/tag/v${finalAttrs.version}"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ tochiaha ]; mainProgram = "pg-gvm"; - platforms = lib.platforms.all; + platforms = postgresql.meta.platforms; }; -} +}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 56a4fcbcd822..650056e66615 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -972,6 +972,7 @@ mapAliases { perldevel = throw "'perldevel' has been dropped due to lack of updates in nixpkgs and lack of consistent support for devel versions by 'perl-cross' releases, use 'perl' instead"; perldevelPackages = perldevel; petrinizer = throw "'petrinizer' has been removed, as it was broken and unmaintained"; # added 2024-05-09 + pg-gvm = throw "pg-gvm has been moved to postgresql.pkgs.pg-gvm to make it work with all versions of PostgreSQL"; # added 2024-11-30 pgadmin = pgadmin4; pharo-spur64 = pharo; # Added 2022-08-03 picom-next = picom; # Added 2024-02-13