* Sync with the trunk.
svn path=/nixpkgs/branches/stdenv-updates/; revision=30852
This commit is contained in:
@@ -302,7 +302,7 @@ rec {
|
||||
else
|
||||
null;
|
||||
in
|
||||
builtins.trace "@:drv:${toString drvPath}:${builtins.exprToString license}:@"
|
||||
builtins.trace "@:drv:${toString drvPath}:${builtins.toString license}:@"
|
||||
val;
|
||||
in pkg // {
|
||||
outPath = printDrvPath pkg.outPath;
|
||||
@@ -330,20 +330,24 @@ rec {
|
||||
{ mkDerivation = args:
|
||||
let
|
||||
pkg = stdenv.mkDerivation args;
|
||||
drv = builtins.unsafeDiscardStringContext pkg.drvPath;
|
||||
license =
|
||||
if pkg ? meta && pkg.meta ? license then
|
||||
pkg.meta.license
|
||||
else if pkg ? outputHash then
|
||||
# Fixed-output derivations such as source tarballs usually
|
||||
# don't have licensing information, but that's OK.
|
||||
null
|
||||
else
|
||||
null;
|
||||
builtins.trace
|
||||
"warning: ${drv} lacks licensing information" null;
|
||||
|
||||
validate = arg:
|
||||
if licensePred license then arg
|
||||
else abort "
|
||||
Error while building ${builtins.unsafeDiscardStringContext pkg.drvPath}:
|
||||
The license predicate is not verified.
|
||||
|
||||
bad license: ${builtins.exprToString license}
|
||||
";
|
||||
else abort ''
|
||||
while building ${drv}:
|
||||
license `${builtins.toString license}' does not pass the predicate.
|
||||
'';
|
||||
|
||||
in pkg // {
|
||||
outPath = validate pkg.outPath;
|
||||
|
||||
@@ -98,7 +98,8 @@ let
|
||||
|| result.system == "powerpc-linux"
|
||||
|| result.system == "armv5tel-linux"
|
||||
|| result.system == "mips64-linux";
|
||||
isSunOS = result.system == "i386-sunos";
|
||||
isSunOS = result.system == "i686-solaris"
|
||||
|| result.system == "x86_64-solaris";
|
||||
isCygwin = result.system == "i686-cygwin";
|
||||
isFreeBSD = result.system == "i686-freebsd"
|
||||
|| result.system == "x86_64-freebsd";
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
{system, allPackages ? import ../../..}:
|
||||
{ system, allPackages ? import ../../.. }:
|
||||
|
||||
rec {
|
||||
|
||||
shell = "/bin/bash";
|
||||
shell =
|
||||
if system == "i686-freebsd" || system == "x86_64-freebsd" then "/usr/local/bin/bash"
|
||||
else "/bin/bash";
|
||||
|
||||
path = (if system == "i386-sunos" then [ "/usr/gnu" ] else []) ++
|
||||
path =
|
||||
(if system == "i686-solaris" then [ "/usr/gnu" ] else []) ++
|
||||
(if system == "i686-netbsd" then [ "/usr/pkg" ] else []) ++
|
||||
["/" "/usr" "/usr/local"];
|
||||
|
||||
@@ -87,6 +90,7 @@ rec {
|
||||
preHook =
|
||||
if system == "i686-darwin" || system == "powerpc-darwin" || system == "x86_64-darwin" then prehookDarwin else
|
||||
if system == "i686-freebsd" then prehookFreeBSD else
|
||||
if system == "x86_64-freebsd" then prehookFreeBSD else
|
||||
if system == "i686-openbsd" then prehookOpenBSD else
|
||||
if system == "i686-netbsd" then prehookNetBSD else
|
||||
prehookBase;
|
||||
@@ -109,7 +113,7 @@ rec {
|
||||
name = "gcc-native";
|
||||
nativeTools = true;
|
||||
nativeLibc = true;
|
||||
nativePrefix = if system == "i386-sunos" then "/usr/gnu" else "/usr";
|
||||
nativePrefix = if system == "i686-solaris" then "/usr/gnu" else "/usr";
|
||||
stdenv = stdenvBoot0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user