mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 08:39:08 +03:00
phpPackages.composer: Move to separate directory
This commit is contained in:
parent
5c8e29da49
commit
a149fe969c
32
pkgs/development/php-packages/composer/default.nix
Normal file
32
pkgs/development/php-packages/composer/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ mkDerivation, fetchurl, pkgs, lib, php }:
|
||||
let
|
||||
pname = "composer";
|
||||
version = "1.10.13";
|
||||
in
|
||||
mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://getcomposer.org/download/${version}/composer.phar";
|
||||
sha256 = "13vhfdlkmpvmk1h30f1i688xk7sdgfj0b82am32jgpa8zmf499sw";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -D $src $out/libexec/composer/composer.phar
|
||||
makeWrapper ${php}/bin/php $out/bin/composer \
|
||||
--add-flags "$out/libexec/composer/composer.phar" \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.unzip ]}
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Dependency Manager for PHP";
|
||||
license = licenses.mit;
|
||||
homepage = "https://getcomposer.org/";
|
||||
maintainers = with maintainers; [ offline ] ++ teams.php.members;
|
||||
};
|
||||
}
|
@ -35,34 +35,7 @@ in
|
||||
packages = {
|
||||
box = callPackage ../development/php-packages/box { };
|
||||
|
||||
composer = mkDerivation rec {
|
||||
version = "1.10.13";
|
||||
pname = "composer";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://getcomposer.org/download/${version}/composer.phar";
|
||||
sha256 = "13vhfdlkmpvmk1h30f1i688xk7sdgfj0b82am32jgpa8zmf499sw";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -D $src $out/libexec/composer/composer.phar
|
||||
makeWrapper ${php}/bin/php $out/bin/composer \
|
||||
--add-flags "$out/libexec/composer/composer.phar" \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.unzip ]}
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Dependency Manager for PHP";
|
||||
license = licenses.mit;
|
||||
homepage = "https://getcomposer.org/";
|
||||
maintainers = with maintainers; [ offline ] ++ teams.php.members;
|
||||
};
|
||||
};
|
||||
composer = callPackage ../development/php-packages/composer { };
|
||||
|
||||
composer2 = mkDerivation rec {
|
||||
version = "2.0.0-RC1";
|
||||
|
Loading…
Reference in New Issue
Block a user