Use composer directly from Nixpkgs for end user package installations

This commit is contained in:
Sander van der Burg 2020-03-31 21:22:17 +02:00 committed by Sander van der Burg
parent 5ffce63100
commit 4fe6f66ecb

View file

@ -64,7 +64,7 @@ class Composer
else if($preferredInstall == "dist")
$params .= " --prefer-dist";
$composerPath = shell_exec("nix-build --no-out-link -E 'let pkgs = import <nixpkgs> {}; composerEnv = import ".__DIR__."/composer-env.nix { inherit (pkgs) stdenv writeTextFile fetchurl php unzip phpPackages; }; in composerEnv.composer'");
$composerPath = shell_exec("nix-build '<nixpkgs>' -A phpPackages.composer --no-out-link");
if($composerPath === false)
throw new Exception("Cannot deploy the composer Nix package!");