2015-09-15 05:27:19 +01:00
|
|
|
args @ { fetchurl, stdenv, builderDefs, paths, mkfontdir, mkfontscale }:
|
|
|
|
with args;
|
2015-09-23 21:44:28 +01:00
|
|
|
let localDefs = builderDefs.passthru.function {
|
|
|
|
src =""; /* put a fetchurl here */
|
|
|
|
buildInputs = [mkfontdir mkfontscale];
|
|
|
|
configureFlags = [];
|
|
|
|
};
|
|
|
|
in with localDefs;
|
2007-12-25 12:29:02 +00:00
|
|
|
let
|
2015-09-23 21:44:28 +01:00
|
|
|
doInstall = fullDepEntry ("
|
|
|
|
mkdir -p \$out/share/fonts/
|
|
|
|
cd \$out/share/fonts
|
|
|
|
for i in ${toString paths}; do
|
|
|
|
find \$i -type f -exec ln -s '{}' . ';' ;
|
|
|
|
done
|
|
|
|
mkfontdir
|
|
|
|
mkfontscale
|
|
|
|
") [minInit addInputs defEnsureDir] ;
|
2007-12-25 12:29:02 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2015-09-23 21:44:28 +01:00
|
|
|
name = "wrapped-font-dir";
|
|
|
|
builder = writeScript (name + "-builder")
|
|
|
|
(textClosure localDefs [ doInstall doForceShare doPropagate]);
|
2014-02-10 20:03:17 +00:00
|
|
|
preferLocalBuild = true;
|
2015-09-23 21:44:28 +01:00
|
|
|
meta = {
|
|
|
|
description = "
|
|
|
|
Just a wrapper to create fonts.dir and fonts.scale .
|
2007-12-25 12:29:02 +00:00
|
|
|
";
|
2015-09-23 21:44:28 +01:00
|
|
|
inherit src;
|
|
|
|
};
|
2007-12-25 12:29:02 +00:00
|
|
|
}
|