From 4fe6f66ecbf84d2e546876a43af17bab37439da6 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Tue, 31 Mar 2020 21:22:17 +0200 Subject: [PATCH] Use composer directly from Nixpkgs for end user package installations --- src/Composer2Nix/Composer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer2Nix/Composer.php b/src/Composer2Nix/Composer.php index c576841..212a838 100644 --- a/src/Composer2Nix/Composer.php +++ b/src/Composer2Nix/Composer.php @@ -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 {}; composerEnv = import ".__DIR__."/composer-env.nix { inherit (pkgs) stdenv writeTextFile fetchurl php unzip phpPackages; }; in composerEnv.composer'"); + $composerPath = shell_exec("nix-build '' -A phpPackages.composer --no-out-link"); if($composerPath === false) throw new Exception("Cannot deploy the composer Nix package!");