php: Simplify generic.nix

There is no need for the outer function since all arguments are shadowed anyway.
This commit is contained in:
Jan Tojnar 2021-06-06 08:33:46 +02:00
parent 4a34590ece
commit c27d583b42
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
3 changed files with 214 additions and 219 deletions

View file

@ -1,9 +1,7 @@
{ callPackage, lib, stdenv, nixosTests, ... }@_args: { callPackage, lib, stdenv, ... }@_args:
let let
generic = (import ./generic.nix) _args; base = callPackage ./generic.nix (_args // {
base = callPackage generic (_args // {
version = "7.4.20"; version = "7.4.20";
sha256 = "0d5ncz97y0271dsmz269wl4721vhq2fn6pmm9rxglc756p36pnha"; sha256 = "0d5ncz97y0271dsmz269wl4721vhq2fn6pmm9rxglc756p36pnha";
}); });

View file

@ -1,9 +1,7 @@
{ callPackage, lib, stdenv, nixosTests, ... }@_args: { callPackage, lib, stdenv, ... }@_args:
let let
generic = (import ./generic.nix) _args; base = callPackage ./generic.nix (_args // {
base = callPackage generic (_args // {
version = "8.0.7"; version = "8.0.7";
sha256 = "0yazcc9x66xg1gmi3rpgk891g6s3mm7aywcadqfqnx1mdz4z5ckj"; sha256 = "0yazcc9x66xg1gmi3rpgk891g6s3mm7aywcadqfqnx1mdz4z5ckj";
}); });

View file

@ -1,8 +1,6 @@
# We have tests for PCRE and PHP-FPM in nixos/tests/php/ or # We have tests for PCRE and PHP-FPM in nixos/tests/php/ or
# both in the same attribute named nixosTests.php # both in the same attribute named nixosTests.php
{ callPackage, lib, stdenv, nixosTests, ... }:
let let
generic = generic =
{ callPackage, lib, stdenv, nixosTests, fetchurl, makeWrapper { callPackage, lib, stdenv, nixosTests, fetchurl, makeWrapper
@ -33,6 +31,7 @@ let
, valgrindSupport ? !stdenv.isDarwin , valgrindSupport ? !stdenv.isDarwin
, ztsSupport ? apxs2Support , ztsSupport ? apxs2Support
}@args: }@args:
let let
# buildEnv wraps php to provide additional extensions and # buildEnv wraps php to provide additional extensions and
# configuration. Its usage is documented in # configuration. Its usage is documented in