stdenv: Reindent
This commit is contained in:
parent
15103e5e5f
commit
cd948c093f
@ -36,35 +36,6 @@ let
|
|||||||
gcc
|
gcc
|
||||||
];
|
];
|
||||||
|
|
||||||
# The stdenv that we are producing.
|
|
||||||
result =
|
|
||||||
|
|
||||||
derivation {
|
|
||||||
inherit system name;
|
|
||||||
|
|
||||||
builder = shell;
|
|
||||||
|
|
||||||
args = ["-e" ./builder.sh];
|
|
||||||
/* TODO: special-cased @var@ substitutions are ugly.
|
|
||||||
However, using substituteAll* from setup.sh seems difficult,
|
|
||||||
as setup.sh can't be directly sourced.
|
|
||||||
Suggestion: split similar utility functions into a separate script.
|
|
||||||
*/
|
|
||||||
|
|
||||||
setup = setupScript;
|
|
||||||
|
|
||||||
inherit preHook initialPath shell;
|
|
||||||
|
|
||||||
propagatedUserEnvPkgs = [gcc] ++
|
|
||||||
lib.filter lib.isDerivation initialPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
// rec {
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "The default build environment for Unix packages in Nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add a utility function to produce derivations that use this
|
# Add a utility function to produce derivations that use this
|
||||||
# stdenv and its shell.
|
# stdenv and its shell.
|
||||||
mkDerivation = attrs:
|
mkDerivation = attrs:
|
||||||
@ -132,6 +103,33 @@ let
|
|||||||
# derivation (e.g., in assertions).
|
# derivation (e.g., in assertions).
|
||||||
(attrs.passthru or {}));
|
(attrs.passthru or {}));
|
||||||
|
|
||||||
|
# The stdenv that we are producing.
|
||||||
|
result =
|
||||||
|
|
||||||
|
derivation {
|
||||||
|
inherit system name;
|
||||||
|
|
||||||
|
builder = shell;
|
||||||
|
|
||||||
|
args = ["-e" ./builder.sh];
|
||||||
|
/* TODO: special-cased @var@ substitutions are ugly.
|
||||||
|
However, using substituteAll* from setup.sh seems difficult,
|
||||||
|
as setup.sh can't be directly sourced.
|
||||||
|
Suggestion: split similar utility functions into a separate script.
|
||||||
|
*/
|
||||||
|
|
||||||
|
setup = setupScript;
|
||||||
|
|
||||||
|
inherit preHook initialPath shell;
|
||||||
|
|
||||||
|
propagatedUserEnvPkgs = [gcc] ++
|
||||||
|
lib.filter lib.isDerivation initialPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
// rec {
|
||||||
|
|
||||||
|
meta.description = "The default build environment for Unix packages in Nixpkgs";
|
||||||
|
|
||||||
# Utility flags to test the type of platform.
|
# Utility flags to test the type of platform.
|
||||||
isDarwin = system == "x86_64-darwin";
|
isDarwin = system == "x86_64-darwin";
|
||||||
isLinux = system == "i686-linux"
|
isLinux = system == "i686-linux"
|
||||||
@ -180,6 +178,8 @@ let
|
|||||||
# Whether we should run paxctl to pax-mark binaries.
|
# Whether we should run paxctl to pax-mark binaries.
|
||||||
needsPax = isLinux;
|
needsPax = isLinux;
|
||||||
|
|
||||||
|
inherit mkDerivation;
|
||||||
|
|
||||||
# For convenience, bring in the library functions in lib/ so
|
# For convenience, bring in the library functions in lib/ so
|
||||||
# packages don't have to do that themselves.
|
# packages don't have to do that themselves.
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user