From 7a5b85cdda7d619ec81de124e601e2333084dce4 Mon Sep 17 00:00:00 2001 From: Domen Kožar Date: Sun, 29 May 2016 14:25:09 +0100 Subject: pkgs.runCommand: passAsFile (buildCommand can be very long) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #15803. This avoids the error: while setting up the build environment: executing ‘/nix/store/7sb42axk5lrxqz45nldrb2pchlys14s1-bash-4.3-p42/bin/bash’: Argument list too long Note: I wanted to make it optional based on buildCommand length, but that seems pointless as I'm sure it's less performant. Amended by vcunat: https://github.com/NixOS/nixpkgs/pull/15803#issuecomment-224841225 --- pkgs/stdenv/generic/setup.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkgs/stdenv/generic') diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 85e74461d2a4f..5b50167d9b9fc 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -827,6 +827,10 @@ showPhaseHeader() { genericBuild() { + if [ -f "$buildCommandPath" ]; then + . "$buildCommandPath" + return + fi if [ -n "$buildCommand" ]; then eval "$buildCommand" return -- cgit 1.4.1