about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPol Dellaiera2022-12-27 22:21:14 +0100
committerPol Dellaiera2022-12-29 18:21:57 +0100
commite8d9e7e90886c3012d589a6ae8b6e104795ba8ee (patch)
treee9e8a08f87a998c366cae3c9ab0b3e09c106f137
parent4ff2402e2affd1ab25ff542d73b2926c57107afc (diff)
php.extensions.gnupg: update `src` attribute
So it can be automatically updated with `nix-update`
-rw-r--r--pkgs/development/php-packages/gnupg/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/development/php-packages/gnupg/default.nix b/pkgs/development/php-packages/gnupg/default.nix
index 22ce2be4473b..249dac0550fa 100644
--- a/pkgs/development/php-packages/gnupg/default.nix
+++ b/pkgs/development/php-packages/gnupg/default.nix
@@ -1,10 +1,18 @@
-{ buildPecl, lib, gpgme, file, gnupg, php }:
+{ buildPecl, lib, gpgme, file, gnupg, php, fetchFromGitHub }:
 
-buildPecl {
+let
+  version = "1.5.1";
+in buildPecl {
+  inherit version;
   pname = "gnupg";
 
-  version = "1.5.1";
-  sha256 = "sha256-qZBvRlqyNDyy8xJ+4gnHJ2Ajh0XDSHjZu8FXZIYhklI=";
+  src = fetchFromGitHub {
+    owner = "php-gnupg";
+    repo = "php-gnupg";
+    rev = "gnupg-${version}";
+    fetchSubmodules = true;
+    sha256 = "sha256-kEc0883sYgmAf1mkH0zRjHzUASnZgQvdYE6VzT5X2RI=";
+  };
 
   buildInputs = [ gpgme ];
   checkInputs = [ gnupg ];
@@ -29,6 +37,7 @@ buildPecl {
   doCheck = true;
 
   meta = with lib; {
+    changelog = "https://github.com/php-gnupg/php-gnupg/releases/tag/gnupg-${version}";
     broken = lib.versionOlder php.version "8.1"; # Broken on PHP older than 8.1.
     description = "PHP wrapper for GpgME library that provides access to GnuPG";
     license = licenses.bsd3;