php: update svanderburg/composer2nix and php-amqplib/php-amqplib

This commit is contained in:
Cole Helbling 2024-05-19 15:26:58 -07:00
parent 0cd3543bc1
commit 1d74f577a1
5 changed files with 66 additions and 68 deletions

View file

@ -4,11 +4,16 @@
let let
inherit (phpPackages) composer; inherit (phpPackages) composer;
filterSrc = src:
builtins.filterSource (path: type: type != "directory" || (baseNameOf path != ".git" && baseNameOf path != ".git" && baseNameOf path != ".svn")) src;
buildZipPackage = { name, src }: buildZipPackage = { name, src }:
stdenv.mkDerivation { stdenv.mkDerivation {
inherit name src; inherit name src;
buildInputs = [ unzip ]; nativeBuildInputs = [ unzip ];
buildCommand = '' buildCommand = ''
shopt -s dotglob
unzip $src unzip $src
baseDir=$(find . -type d -mindepth 1 -maxdepth 1) baseDir=$(find . -type d -mindepth 1 -maxdepth 1)
cd $baseDir cd $baseDir
@ -133,10 +138,9 @@ let
''} ''}
'') (builtins.attrNames dependencies); '') (builtins.attrNames dependencies);
extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ]; extraArgs = removeAttrs args [ "packages" "devPackages" "buildInputs" ];
in in
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = "composer-${name}";
buildInputs = [ php composer ] ++ buildInputs; buildInputs = [ php composer ] ++ buildInputs;
inherit unpackPhase buildPhase; inherit unpackPhase buildPhase;
@ -233,6 +237,7 @@ let
} // extraArgs); } // extraArgs);
in in
{ {
inherit filterSrc;
composer = lib.makeOverridable composer; composer = lib.makeOverridable composer;
buildZipPackage = lib.makeOverridable buildZipPackage; buildZipPackage = lib.makeOverridable buildZipPackage;
buildPackage = lib.makeOverridable buildPackage; buildPackage = lib.makeOverridable buildPackage;

View file

@ -1,7 +1,7 @@
{ {
"name": "nixos/ofborg-webhook", "name": "nixos/ofborg-webhook",
"require": { "require": {
"php-amqplib/php-amqplib": ">=2.6.1", "php-amqplib/php-amqplib": ">=3.6.2",
"svanderburg/composer2nix": ">=0.0.3" "svanderburg/composer2nix": ">=0.0.6"
} }
} }

81
php/composer.lock generated
View file

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "6bf65db2920cc5f1530dd0c9d42fdaaa", "content-hash": "cddc3bf153efe4b7d2314531fd7850a3",
"packages": [ "packages": [
{ {
"name": "paragonie/constant_time_encoding", "name": "paragonie/constant_time_encoding",
"version": "v2.4.0", "version": "v2.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/paragonie/constant_time_encoding.git", "url": "https://github.com/paragonie/constant_time_encoding.git",
"reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105",
"reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -71,7 +71,7 @@
"issues": "https://github.com/paragonie/constant_time_encoding/issues", "issues": "https://github.com/paragonie/constant_time_encoding/issues",
"source": "https://github.com/paragonie/constant_time_encoding" "source": "https://github.com/paragonie/constant_time_encoding"
}, },
"time": "2020-12-06T15:14:20+00:00" "time": "2024-05-08T12:18:48+00:00"
}, },
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
@ -125,22 +125,22 @@
}, },
{ {
"name": "php-amqplib/php-amqplib", "name": "php-amqplib/php-amqplib",
"version": "v3.0.0", "version": "v3.6.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-amqplib/php-amqplib.git", "url": "https://github.com/php-amqplib/php-amqplib.git",
"reference": "c0a8eade209b7e43d6a405303d8de716dfd02749" "reference": "cb514530ce45a6d2f636be5196010c47c3bcf6e0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/c0a8eade209b7e43d6a405303d8de716dfd02749", "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/cb514530ce45a6d2f636be5196010c47c3bcf6e0",
"reference": "c0a8eade209b7e43d6a405303d8de716dfd02749", "reference": "cb514530ce45a6d2f636be5196010c47c3bcf6e0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-sockets": "*", "ext-sockets": "*",
"php": "^7.0|~8.0.0", "php": "^7.2||^8.0",
"phpseclib/phpseclib": "^2.0|^3.0" "phpseclib/phpseclib": "^2.0|^3.0"
}, },
"conflict": { "conflict": {
@ -152,8 +152,8 @@
"require-dev": { "require-dev": {
"ext-curl": "*", "ext-curl": "*",
"nategood/httpful": "^0.2.20", "nategood/httpful": "^0.2.20",
"phpunit/phpunit": "^6.5|^7.0|^9.5", "phpunit/phpunit": "^7.5|^9.5",
"squizlabs/php_codesniffer": "^3.5" "squizlabs/php_codesniffer": "^3.6"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -200,22 +200,22 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-amqplib/php-amqplib/issues", "issues": "https://github.com/php-amqplib/php-amqplib/issues",
"source": "https://github.com/php-amqplib/php-amqplib/tree/v3.0.0" "source": "https://github.com/php-amqplib/php-amqplib/tree/v3.6.2"
}, },
"time": "2021-03-16T15:00:23+00:00" "time": "2024-04-15T18:31:22+00:00"
}, },
{ {
"name": "phpseclib/phpseclib", "name": "phpseclib/phpseclib",
"version": "3.0.8", "version": "3.0.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpseclib/phpseclib.git", "url": "https://github.com/phpseclib/phpseclib.git",
"reference": "d9615a6fb970d9933866ca8b4036ec3407b020b6" "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d9615a6fb970d9933866ca8b4036ec3407b020b6", "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
"reference": "d9615a6fb970d9933866ca8b4036ec3407b020b6", "reference": "cfa2013d0f68c062055180dd4328cc8b9d1f30b8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -224,11 +224,10 @@
"php": ">=5.6.1" "php": ">=5.6.1"
}, },
"require-dev": { "require-dev": {
"phing/phing": "~2.7", "phpunit/phpunit": "*"
"phpunit/phpunit": "^5.7|^6.0|^9.4",
"squizlabs/php_codesniffer": "~2.0"
}, },
"suggest": { "suggest": {
"ext-dom": "Install the DOM extension to load XML formatted public keys.",
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
@ -297,7 +296,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/phpseclib/phpseclib/issues", "issues": "https://github.com/phpseclib/phpseclib/issues",
"source": "https://github.com/phpseclib/phpseclib/tree/3.0.8" "source": "https://github.com/phpseclib/phpseclib/tree/3.0.37"
}, },
"funding": [ "funding": [
{ {
@ -313,27 +312,24 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-04-19T03:20:48+00:00" "time": "2024-03-03T02:14:58+00:00"
}, },
{ {
"name": "svanderburg/composer2nix", "name": "svanderburg/composer2nix",
"version": "v0.0.5", "version": "v0.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/svanderburg/composer2nix.git", "url": "https://github.com/svanderburg/composer2nix.git",
"reference": "9983c6fafb277f6b305edf232c2690d6d28ec092" "reference": "299caca4aac42d7639a42eb4dde951c010f6e91c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/svanderburg/composer2nix/zipball/9983c6fafb277f6b305edf232c2690d6d28ec092", "url": "https://api.github.com/repos/svanderburg/composer2nix/zipball/299caca4aac42d7639a42eb4dde951c010f6e91c",
"reference": "9983c6fafb277f6b305edf232c2690d6d28ec092", "reference": "299caca4aac42d7639a42eb4dde951c010f6e91c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"svanderburg/pndp": "0.0.2" "svanderburg/pndp": "0.0.4"
},
"require-dev": {
"phpdocumentor/phpdocumentor": "2.9.x"
}, },
"bin": [ "bin": [
"bin/composer2nix" "bin/composer2nix"
@ -358,27 +354,24 @@
"description": "Generate Nix expressions to build PHP composer packages", "description": "Generate Nix expressions to build PHP composer packages",
"support": { "support": {
"issues": "https://github.com/svanderburg/composer2nix/issues", "issues": "https://github.com/svanderburg/composer2nix/issues",
"source": "https://github.com/svanderburg/composer2nix/tree/v0.0.5" "source": "https://github.com/svanderburg/composer2nix/tree/v0.0.6"
}, },
"time": "2021-02-27T12:58:49+00:00" "time": "2022-03-01T23:41:50+00:00"
}, },
{ {
"name": "svanderburg/pndp", "name": "svanderburg/pndp",
"version": "v0.0.2", "version": "v0.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/svanderburg/pndp.git", "url": "https://github.com/svanderburg/pndp.git",
"reference": "4bfe9c4120c23354ab8dc295957dc3009a39bff0" "reference": "bc795b341d95c24bb577e0d7a4a37fde98b1cce8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/svanderburg/pndp/zipball/4bfe9c4120c23354ab8dc295957dc3009a39bff0", "url": "https://api.github.com/repos/svanderburg/pndp/zipball/bc795b341d95c24bb577e0d7a4a37fde98b1cce8",
"reference": "4bfe9c4120c23354ab8dc295957dc3009a39bff0", "reference": "bc795b341d95c24bb577e0d7a4a37fde98b1cce8",
"shasum": "" "shasum": ""
}, },
"require-dev": {
"phpdocumentor/phpdocumentor": "2.9.x"
},
"bin": [ "bin": [
"bin/pndp-build" "bin/pndp-build"
], ],
@ -402,9 +395,9 @@
"description": "PNDP: An internal DSL for Nix in PHP", "description": "PNDP: An internal DSL for Nix in PHP",
"support": { "support": {
"issues": "https://github.com/svanderburg/pndp/issues", "issues": "https://github.com/svanderburg/pndp/issues",
"source": "https://github.com/svanderburg/pndp/tree/v0.0.2" "source": "https://github.com/svanderburg/pndp/tree/v0.0.4"
}, },
"time": "2017-10-22T12:43:22+00:00" "time": "2022-02-26T22:15:06+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
@ -415,5 +408,5 @@
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.0.0" "plugin-api-version": "2.6.0"
} }

View file

@ -1,11 +1,11 @@
{pkgs ? import <nixpkgs> { {pkgs ? import <nixpkgs> {
inherit system; inherit system;
}, system ? builtins.currentSystem, noDev ? false}: }, system ? builtins.currentSystem, noDev ? false, php ? pkgs.php, phpPackages ? pkgs.phpPackages}:
let let
composerEnv = import ./composer-env.nix { composerEnv = import ./composer-env.nix {
inherit (pkgs) stdenv lib writeTextFile fetchurl unzip phpPackages; inherit (pkgs) stdenv lib writeTextFile fetchurl unzip;
php = pkgs.php74; inherit php phpPackages;
}; };
in in
import ./php-packages.nix { import ./php-packages.nix {

View file

@ -5,10 +5,10 @@ let
"paragonie/constant_time_encoding" = { "paragonie/constant_time_encoding" = {
targetDir = ""; targetDir = "";
src = composerEnv.buildZipPackage { src = composerEnv.buildZipPackage {
name = "paragonie-constant_time_encoding-f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c"; name = "paragonie-constant_time_encoding-52a0d99e69f56b9ec27ace92ba56897fe6993105";
src = fetchurl { src = fetchurl {
url = "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c"; url = "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105";
sha256 = "1r1xj3j7s5mskw5gh3ars4dfhvcn7d252gdqgpif80026kj5fvrp"; sha256 = "1ja5b3fm5v665igrd37vs28zdipbh1xgh57lil2iaggvh1b8kh4x";
}; };
}; };
}; };
@ -25,40 +25,40 @@ let
"php-amqplib/php-amqplib" = { "php-amqplib/php-amqplib" = {
targetDir = ""; targetDir = "";
src = composerEnv.buildZipPackage { src = composerEnv.buildZipPackage {
name = "php-amqplib-php-amqplib-c0a8eade209b7e43d6a405303d8de716dfd02749"; name = "php-amqplib-php-amqplib-cb514530ce45a6d2f636be5196010c47c3bcf6e0";
src = fetchurl { src = fetchurl {
url = "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/c0a8eade209b7e43d6a405303d8de716dfd02749"; url = "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/cb514530ce45a6d2f636be5196010c47c3bcf6e0";
sha256 = "1lck5hpraxi4w3831lfzz6l7c82118b56aghdz0dr4r92366j3xf"; sha256 = "0mjca0m9960m8xgi22azwk8v1lgg8yznxscw10sqfzgp4wj4sfv0";
}; };
}; };
}; };
"phpseclib/phpseclib" = { "phpseclib/phpseclib" = {
targetDir = ""; targetDir = "";
src = composerEnv.buildZipPackage { src = composerEnv.buildZipPackage {
name = "phpseclib-phpseclib-d9615a6fb970d9933866ca8b4036ec3407b020b6"; name = "phpseclib-phpseclib-cfa2013d0f68c062055180dd4328cc8b9d1f30b8";
src = fetchurl { src = fetchurl {
url = "https://api.github.com/repos/phpseclib/phpseclib/zipball/d9615a6fb970d9933866ca8b4036ec3407b020b6"; url = "https://api.github.com/repos/phpseclib/phpseclib/zipball/cfa2013d0f68c062055180dd4328cc8b9d1f30b8";
sha256 = "1xyymb11qdx8rn6c9bx9js8yq405bmjq8ar8phvpji9a3fdd6z4v"; sha256 = "1wgzy4fbj565czpn9xasr8lnd9ilh1x3bsalrpx5bskvqr4zspgj";
}; };
}; };
}; };
"svanderburg/composer2nix" = { "svanderburg/composer2nix" = {
targetDir = ""; targetDir = "";
src = composerEnv.buildZipPackage { src = composerEnv.buildZipPackage {
name = "svanderburg-composer2nix-9983c6fafb277f6b305edf232c2690d6d28ec092"; name = "svanderburg-composer2nix-299caca4aac42d7639a42eb4dde951c010f6e91c";
src = fetchurl { src = fetchurl {
url = "https://api.github.com/repos/svanderburg/composer2nix/zipball/9983c6fafb277f6b305edf232c2690d6d28ec092"; url = "https://api.github.com/repos/svanderburg/composer2nix/zipball/299caca4aac42d7639a42eb4dde951c010f6e91c";
sha256 = "1s1gv2b4y9pjv56mif8fgch56sssdmrcwb1gk3gksxc0jq2w2zbv"; sha256 = "0vb7q4za6z89azz4c5v7hgcv9gblcpk7hffl6va7q5f27fyyhwy0";
}; };
}; };
}; };
"svanderburg/pndp" = { "svanderburg/pndp" = {
targetDir = ""; targetDir = "";
src = composerEnv.buildZipPackage { src = composerEnv.buildZipPackage {
name = "svanderburg-pndp-4bfe9c4120c23354ab8dc295957dc3009a39bff0"; name = "svanderburg-pndp-bc795b341d95c24bb577e0d7a4a37fde98b1cce8";
src = fetchurl { src = fetchurl {
url = "https://api.github.com/repos/svanderburg/pndp/zipball/4bfe9c4120c23354ab8dc295957dc3009a39bff0"; url = "https://api.github.com/repos/svanderburg/pndp/zipball/bc795b341d95c24bb577e0d7a4a37fde98b1cce8";
sha256 = "0n2vwpwshv16bhb7a6j95m664zh4lpfa7dqmcyhmn89nxpgvg91y"; sha256 = "1y46wsccjwdkvs1c1bklwbp7crsg0axyr7ncdibbny1sr54xb24i";
}; };
}; };
}; };
@ -68,7 +68,7 @@ in
composerEnv.buildPackage { composerEnv.buildPackage {
inherit packages devPackages noDev; inherit packages devPackages noDev;
name = "nixos-ofborg-webhook"; name = "nixos-ofborg-webhook";
src = ./.; src = composerEnv.filterSrc ./.;
executable = false; executable = false;
symlinkDependencies = false; symlinkDependencies = false;
meta = {}; meta = {};