From cce1630d5bcd15f41852d54c90be0f3746c3c9cf Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Mon, 25 Jun 2018 23:00:08 +0200 Subject: [PATCH] Make all composer-env functions entirely overridable, not mkDerivation --- src/Composer2Nix/composer-env.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Composer2Nix/composer-env.nix b/src/Composer2Nix/composer-env.nix index 988a385..955a359 100644 --- a/src/Composer2Nix/composer-env.nix +++ b/src/Composer2Nix/composer-env.nix @@ -2,7 +2,7 @@ { stdenv, writeTextFile, fetchurl, php, unzip }: -rec { +let composer = stdenv.mkDerivation { name = "composer-1.6.5"; src = fetchurl { @@ -166,7 +166,7 @@ rec { extraArgs = removeAttrs args [ "name" "packages" "devPackages" "buildInputs" ]; in - stdenv.lib.makeOverridable stdenv.mkDerivation ({ + stdenv.mkDerivation ({ name = "composer-${name}"; buildInputs = [ php composer ] ++ buildInputs; @@ -262,4 +262,9 @@ rec { runHook postInstall ''; } // extraArgs); +in +{ + composer = stdenv.lib.makeOverridable composer; + buildZipPackage = stdenv.lib.makeOverridable buildZipPackage; + buildPackage = stdenv.lib.makeOverridable buildPackage; }