From 5b15f75a13fabdc6793e0f89b8548ca5a95e820a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 20 Jun 2005 15:03:52 +0000 Subject: [PATCH] * mkDerivation: accept an argument `realBuilder' (stupid name) to override the default builder (i.e., bash). For example, stdenv.mkDerivation { realBuilder = perl ~ "bin/perl"; args = [ "-w" ./builder.pl ]; } svn path=/nixpkgs/trunk/; revision=3219 --- pkgs/stdenv/generic/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index f57eebe9c74..b25703eb9af 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -25,8 +25,9 @@ let { # stdenv and its shell. // { mkDerivation = attrs: derivation (attrs // { - builder = shell; - args = ["-e" (if attrs ? builder then attrs.builder else ./default-builder.sh)]; + builder = if attrs ? realBuilder then attrs.realBuilder else shell; + args = if attrs ? args then attrs.args else + ["-e" (if attrs ? builder then attrs.builder else ./default-builder.sh)]; stdenv = body; system = body.system; });