about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/php-packages
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/php-packages')
-rw-r--r--nixpkgs/pkgs/development/php-packages/castor/default.nix60
-rw-r--r--nixpkgs/pkgs/development/php-packages/opentelemetry/default.nix6
-rw-r--r--nixpkgs/pkgs/development/php-packages/psysh/default.nix4
3 files changed, 66 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/php-packages/castor/default.nix b/nixpkgs/pkgs/development/php-packages/castor/default.nix
new file mode 100644
index 000000000000..ed6ce2ba33f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/php-packages/castor/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, fetchurl
+, makeBinaryWrapper
+, installShellFiles
+, php
+, nix-update-script
+, testers
+, castor
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "castor";
+  version = "0.8.0";
+
+
+  src = fetchurl {
+    url = "https://github.com/jolicode/castor/releases/download/v${finalAttrs.version}/castor.linux-amd64.phar";
+    hash = "sha256-0lnn4mS1/DgUoRoMFvCjwQ0j9CX9XWlskbtX9roFCfc=";
+  };
+
+  dontUnpack = true;
+
+  nativeBuildInputs = [ makeBinaryWrapper installShellFiles ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    install -D $src $out/libexec/castor/castor.phar
+    makeWrapper ${php}/bin/php $out/bin/castor \
+      --add-flags "$out/libexec/castor/castor.phar"
+    runHook postInstall
+  '';
+
+  # castor requires to be initialized to generate completion files
+  postInstall = ''
+    echo "yes" | ${php}/bin/php $src
+    installShellCompletion --cmd castor \
+      --bash <($out/bin/castor completion bash) \
+      --fish <($out/bin/castor completion fish) \
+      --zsh <($out/bin/castor completion zsh)
+  '';
+
+  passthru = {
+    updateScript = nix-update-script { };
+    tests.version = testers.testVersion {
+      inherit (finalAttrs) version;
+      package = castor;
+      command = "castor --version";
+    };
+  };
+
+  meta = with lib; {
+    description = "DX oriented task runner and command launcher built with PHP";
+    homepage = "https://github.com/jolicode/castor";
+    changelog = "https://github.com/jolicode/castor/blob/v${finalAttrs.version}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ gaelreyrol ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/php-packages/opentelemetry/default.nix b/nixpkgs/pkgs/development/php-packages/opentelemetry/default.nix
index dda00a883d33..618d7806d97f 100644
--- a/nixpkgs/pkgs/development/php-packages/opentelemetry/default.nix
+++ b/nixpkgs/pkgs/development/php-packages/opentelemetry/default.nix
@@ -1,7 +1,7 @@
 { lib, buildPecl, fetchFromGitHub }:
 
 let
-  version = "1.0.0beta6";
+  version = "1.0.0beta7";
 in buildPecl {
   inherit version;
   pname = "opentelemetry";
@@ -10,9 +10,11 @@ in buildPecl {
     owner = "open-telemetry";
     repo = "opentelemetry-php-instrumentation";
     rev = version;
-    hash = "sha256-dbyFb+Wh4thbnwASgPuQ4ceeke6NDMFLvNXjp66hLCM=";
+    hash = "sha256-FDCgRN+aV9c6ceKszrHDBmi14dEhrirlU8cbYrmIGdY=";
   };
 
+  sourceRoot = "source/ext";
+
   doCheck = true;
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/development/php-packages/psysh/default.nix b/nixpkgs/pkgs/development/php-packages/psysh/default.nix
index de8fd450de28..04b0ff69cc03 100644
--- a/nixpkgs/pkgs/development/php-packages/psysh/default.nix
+++ b/nixpkgs/pkgs/development/php-packages/psysh/default.nix
@@ -2,14 +2,14 @@
 
 let
   pname = "psysh";
-  version = "0.11.18";
+  version = "0.11.20";
 in
 mkDerivation {
   inherit pname version;
 
   src = fetchurl {
     url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";
-    sha256 = "sha256-roonJBpMXOAsa/IyPn3kR1VSHH/kUJFuUU6myVI7Y+A=";
+    sha256 = "sha256-1d07/qE6qamsmBkkuuxIY9YgYC7wgP21QDc5Iu9Ecv4=";
   };
 
   dontUnpack = true;