mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
Merge pull request #309314 from drupol/php/build-support/minor-changes
build-support/php: minor refactoring
This commit is contained in:
commit
c5a8fd5df4
@ -2,11 +2,8 @@
|
||||
callPackage,
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
writeTextDir,
|
||||
php,
|
||||
makeBinaryWrapper,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
}:
|
||||
|
||||
let
|
||||
@ -75,27 +72,30 @@ let
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
composerRepository = phpDrv.mkComposerRepository {
|
||||
inherit composer composer-local-repo-plugin;
|
||||
inherit (finalAttrs)
|
||||
patches
|
||||
pname
|
||||
src
|
||||
vendorHash
|
||||
version
|
||||
;
|
||||
composerRepository =
|
||||
previousAttrs.composerRepository or (phpDrv.mkComposerRepository {
|
||||
inherit composer composer-local-repo-plugin;
|
||||
inherit (finalAttrs)
|
||||
patches
|
||||
pname
|
||||
src
|
||||
vendorHash
|
||||
version
|
||||
;
|
||||
|
||||
composerLock = previousAttrs.composerLock or null;
|
||||
composerNoDev = previousAttrs.composerNoDev or true;
|
||||
composerNoPlugins = previousAttrs.composerNoPlugins or true;
|
||||
composerNoScripts = previousAttrs.composerNoScripts or true;
|
||||
composerStrictValidation = previousAttrs.composerStrictValidation or true;
|
||||
composerLock = previousAttrs.composerLock or null;
|
||||
composerNoDev = previousAttrs.composerNoDev or true;
|
||||
composerNoPlugins = previousAttrs.composerNoPlugins or true;
|
||||
composerNoScripts = previousAttrs.composerNoScripts or true;
|
||||
composerStrictValidation = previousAttrs.composerStrictValidation or true;
|
||||
});
|
||||
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_DISABLE_NETWORK = "1";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
};
|
||||
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_DISABLE_NETWORK = "1";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
|
||||
meta = previousAttrs.meta or { } // {
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
@ -2,7 +2,6 @@
|
||||
callPackage,
|
||||
stdenvNoCC,
|
||||
lib,
|
||||
writeTextDir,
|
||||
fetchFromGitHub,
|
||||
php,
|
||||
}:
|
||||
@ -107,10 +106,12 @@ let
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
COMPOSER_HTACCESS_PROTECT = "0";
|
||||
COMPOSER_DISABLE_NETWORK = "0";
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
COMPOSER_HTACCESS_PROTECT = "0";
|
||||
COMPOSER_DISABLE_NETWORK = "0";
|
||||
};
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo =
|
||||
|
@ -43,10 +43,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-edbn07r/Uc1g0qOuVBZBs6N1bMN5kIfA1b4FCufdw5M=";
|
||||
};
|
||||
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
COMPOSER_HTACCESS_PROTECT = "0";
|
||||
COMPOSER_DISABLE_NETWORK = "1";
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
COMPOSER_HTACCESS_PROTECT = "0";
|
||||
COMPOSER_DISABLE_NETWORK = "1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
|
||||
|
@ -32,7 +32,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
|
||||
mkdir -p $out/bin
|
||||
install -D $src $out/libexec/composer/composer.phar
|
||||
makeWrapper ${php}/bin/php $out/bin/composer \
|
||||
makeWrapper ${lib.getExe php} $out/bin/composer \
|
||||
--add-flags "$out/libexec/composer/composer.phar" \
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
@ -53,6 +53,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
description = "Dependency Manager for PHP, shipped from the PHAR file";
|
||||
homepage = "https://getcomposer.org/";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "composer";
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user