nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

phpExtensions.ioncube-loader: 13.0.2 -> 14.4.1

- x86_64-darwin is no longer supported by upstream
- added support for Zend Thread Safety

Serg 6ad4c1dd 842e9cdf

+27 -34
+27 -34
pkgs/development/php-packages/ioncube-loader/default.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 - fetchzip, 4 + fetchurl, 5 5 php, 6 6 }: 7 7 8 8 let 9 - phpVersion = lib.versions.majorMinor php.version; 9 + source = 10 + { 11 + "aarch64-darwin" = { 12 + url = "https://web.archive.org/web/20250614103627/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_dar_arm64.tar.gz"; 13 + sha256 = "sha256-Dji4PIX5GqU6mOC7ZrSEu3dAZtsiVVuvKQ9Z5aGiuQ4="; 14 + }; 15 + "aarch64-linux" = { 16 + url = "https://web.archive.org/web/20250614103715/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_aarch64.tar.gz"; 17 + sha256 = "sha256-zushkH7g3L62bDdjgTZamWcxOp35xQisOjSG6e2EEHg="; 18 + }; 19 + "x86_64-linux" = { 20 + url = "https://web.archive.org/web/20250614103238/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz"; 21 + sha256 = "sha256-W8AXulfQx2nkT9nznCCx2lrayKA3R+n2TyhU1ScNjMg="; 22 + }; 23 + } 24 + .${stdenv.hostPlatform.system}; 10 25 11 - variant = { 12 - "aarch64-darwin" = { 13 - url = "https://web.archive.org/web/20240209234707/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_dar_arm64.tar.gz"; 14 - sha256 = "sha256-J6+bOXX9uRdrGouMAxt7nROjjfH4P2txb1hmPoHUmdM="; 15 - prefix = "dar"; 16 - }; 17 - "aarch64-linux" = { 18 - url = "https://web.archive.org/web/20240209234617/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_aarch64.tar.gz"; 19 - sha256 = "sha256-oOO4zr0CssxVGIUIfmAujILqOfQf8dJPADkr03a8HAs="; 20 - prefix = "lin"; 21 - }; 22 - "x86_64-linux" = { 23 - url = "https://web.archive.org/web/20240209052345if_/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz"; 24 - sha256 = "sha256-rsXKgxKHldBKDjJTsOdJP4SxfxLmMPDY+GizBpuDeyw="; 25 - prefix = "lin"; 26 - }; 27 - "x86_64-darwin" = { 28 - url = "https://web.archive.org/web/20240209234406/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_mac_x86-64.tar.gz"; 29 - sha256 = "sha256-bz2hQOaFbXePa8MhAZHESpZMRjjBH51IgvbR2EfBYMg="; 30 - prefix = "mac"; 31 - }; 32 - }; 26 + phpVersion = lib.versions.majorMinor php.version; 27 + systemPrefix = lib.substring 0 3 stdenv.hostPlatform.parsed.kernel.name; # lin, dar, fre 28 + 29 + filename = "ioncube_loader_${systemPrefix}_${phpVersion}${lib.optionalString php.ztsSupport "_ts"}.so"; 33 30 in 34 31 stdenv.mkDerivation { 35 - version = "13.0.2"; 36 32 pname = "ioncube-loader"; 33 + version = "14.4.1"; 34 + 37 35 extensionName = "ioncube-loader"; 38 36 39 - src = fetchzip { 40 - url = variant.${stdenv.hostPlatform.system}.url; 41 - sha256 = variant.${stdenv.hostPlatform.system}.sha256; 42 - }; 37 + src = fetchurl source; 43 38 44 39 installPhase = '' 45 - mkdir -p $out/lib/php/extensions 46 - cp $src/ioncube_loader_${ 47 - variant.${stdenv.hostPlatform.system}.prefix 48 - }_${phpVersion}.so $out/lib/php/extensions/ioncube-loader.so 40 + runHook preInstall 41 + install -Dm755 '${filename}' $out/lib/php/extensions/ioncube-loader.so 42 + runHook postInstall 49 43 ''; 50 44 51 45 meta = with lib; { ··· 52 58 platforms = [ 53 59 "x86_64-linux" 54 60 "aarch64-linux" 55 - "x86_64-darwin" 56 61 "aarch64-darwin" 57 62 ]; 58 63 };