mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
31 lines
832 B
Nix
31 lines
832 B
Nix
args @ { fetchurl, stdenv, builderDefs, paths, mkfontdir, mkfontscale }:
|
|
with args;
|
|
let localDefs = builderDefs.passthru.function {
|
|
src =""; /* put a fetchurl here */
|
|
buildInputs = [mkfontdir mkfontscale];
|
|
configureFlags = [];
|
|
};
|
|
in with localDefs;
|
|
let
|
|
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] ;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
name = "wrapped-font-dir";
|
|
builder = writeScript (name + "-builder")
|
|
(textClosure localDefs [ doInstall doForceShare doPropagate]);
|
|
preferLocalBuild = true;
|
|
meta = {
|
|
description = "
|
|
Just a wrapper to create fonts.dir and fonts.scale .
|
|
";
|
|
inherit src;
|
|
};
|
|
}
|