5862e56f26
builder may now be omitted entirely; the function `mkDerivation' will then use a default build script. svn path=/nixpkgs/trunk/; revision=868
37 lines
823 B
Nix
37 lines
823 B
Nix
{stdenv, glibc, pkgs, genericStdenv, gccWrapper}:
|
|
|
|
let {
|
|
|
|
body =
|
|
|
|
genericStdenv {
|
|
name = "stdenv-nix-linux";
|
|
preHook = ./prehook.sh;
|
|
initialPath = (import ../nix/path.nix) {pkgs = pkgs;};
|
|
|
|
inherit stdenv;
|
|
|
|
gcc = gccWrapper {
|
|
name = pkgs.gcc.name;
|
|
nativeTools = false;
|
|
nativeGlibc = false;
|
|
inherit (pkgs) gcc binutils;
|
|
inherit stdenv glibc;
|
|
};
|
|
|
|
param1 = pkgs.bash;
|
|
}
|
|
|
|
# Add a utility function to produce derivations that use this
|
|
# stdenv and its the bash shell.
|
|
// {
|
|
mkDerivation = attrs: derivation (attrs // {
|
|
builder = pkgs.bash ~ /bin/sh;
|
|
args = ["-e" (if attrs ? builder then attrs.builder else ./default-builder.sh)];
|
|
stdenv = body;
|
|
system = body.system;
|
|
});
|
|
};
|
|
|
|
}
|