nixpkgs/pkgs/stdenv/nix-linux/default.nix

37 lines
823 B
Nix
Raw Normal View History

{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;
});
};
}