forked from mirrors/nixpkgs
A paranoia-induced refactoring, a cleanup of buildInputs bypass in font-related part, fix for builderDefsPackage for cleaner overrides.
svn path=/nixpkgs/trunk/; revision=12671
This commit is contained in:
parent
a84989091f
commit
f972b13ac5
|
@ -130,7 +130,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
pkgs=\"\"
|
pkgs=\"\"
|
||||||
for i in \$NIX_GCC ${toString buildInputs}; do
|
for i in \$NIX_GCC ${toString realBuildInputs}; do
|
||||||
findInputs \$i
|
findInputs \$i
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
autoConfigureFlags = condConcat "" configFlags check;
|
autoConfigureFlags = condConcat "" configFlags check;
|
||||||
autoMakeFlags = condConcat "" buildFlags check;
|
autoMakeFlags = condConcat "" buildFlags check;
|
||||||
useConfig = getAttr ["useConfig"] false args;
|
useConfig = getAttr ["useConfig"] false args;
|
||||||
buildInputs =
|
realBuildInputs =
|
||||||
lib.closePropagation ((if useConfig then
|
lib.closePropagation ((if useConfig then
|
||||||
autoBuildInputs else
|
autoBuildInputs else
|
||||||
getAttr ["buildInputs"] [] args)++
|
getAttr ["buildInputs"] [] args)++
|
||||||
|
@ -461,8 +461,8 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
# for overrides..
|
# for overrides..
|
||||||
builderDefsArgs = args;
|
builderDefsArgs = args;
|
||||||
|
|
||||||
innerBuilderDefsPackage = bd: func: args: (
|
innerBuilderDefsPackage = bd: args: (
|
||||||
let localDefs = bd.meta.function ((func (bd // args)) // args); in
|
let localDefs = bd.meta.function args; in
|
||||||
|
|
||||||
stdenv.mkDerivation ((rec {
|
stdenv.mkDerivation ((rec {
|
||||||
inherit (localDefs) name;
|
inherit (localDefs) name;
|
||||||
|
@ -474,12 +474,15 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
} else {}) // extraDerivationAttrs)
|
} else {}) // extraDerivationAttrs)
|
||||||
);
|
);
|
||||||
|
|
||||||
builderDefsPackage = bd: func: args: (composedArgsAndFun
|
builderDefsPackage = bd: func:
|
||||||
(innerBuilderDefsPackage bd func) ((func (bd // args)) // args));
|
foldArgs
|
||||||
|
(x: y: ((func (bd // x // y)) // y))
|
||||||
|
(innerBuilderDefsPackage bd)
|
||||||
|
{};
|
||||||
|
|
||||||
generateFontsFromSFD = noDepEntry(''
|
generateFontsFromSFD = FullDepEntry (''
|
||||||
for i in *.sfd; do
|
for i in *.sfd; do
|
||||||
${args.fontforge}/bin/fontforge -c \
|
fontforge -c \
|
||||||
'Open($1);
|
'Open($1);
|
||||||
${optionalString (args ? extraFontForgeCommands) args.extraFontForgeCommands
|
${optionalString (args ? extraFontForgeCommands) args.extraFontForgeCommands
|
||||||
}Reencode("unicode");
|
}Reencode("unicode");
|
||||||
|
@ -493,7 +496,7 @@ args: with args; with stringsWithDeps; with lib;
|
||||||
${optionalString (getAttr ["createENC"] true args) ''Generate($1:r + ".enc");''}
|
${optionalString (getAttr ["createENC"] true args) ''Generate($1:r + ".enc");''}
|
||||||
' $i;
|
' $i;
|
||||||
done
|
done
|
||||||
'');
|
'') ["minInit" "addInputs" "doUnpack"];
|
||||||
|
|
||||||
installFonts = FullDepEntry (''
|
installFonts = FullDepEntry (''
|
||||||
ensureDir $out/share/fonts/truetype/public/${args.name}
|
ensureDir $out/share/fonts/truetype/public/${args.name}
|
||||||
|
|
Loading…
Reference in a new issue