font-cache without indent
This commit is contained in:
parent
8960e7db51
commit
d223b86670
|
@ -1,13 +1,13 @@
|
||||||
# vim: set noet sw=2 ts=2 sts=2:
|
# vim: set noet sw=2 ts=2 sts=2:
|
||||||
{lib, pkgs, ...}:
|
{lib, pkgs, ...}:
|
||||||
({src ? null , srcs ? null, name ? "", pname ? "", version ? ""}:
|
({src ? null , srcs ? null, name ? "", pname ? "", version ? ""}:
|
||||||
with pkgs;
|
with pkgs;
|
||||||
let
|
let
|
||||||
name_ =
|
name_ =
|
||||||
if "" != name
|
if "" != name
|
||||||
then name
|
then name
|
||||||
else "${pname}-v${version}";
|
else "${pname}-v${version}";
|
||||||
in stdenv.mkDerivation ({
|
in stdenv.mkDerivation ({
|
||||||
name = name_;
|
name = name_;
|
||||||
nativeBuildInputs = [ sfnt2woff-zopfli unzip coreutils fontconfig woff2 ];
|
nativeBuildInputs = [ sfnt2woff-zopfli unzip coreutils fontconfig woff2 ];
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
|
@ -54,15 +54,15 @@ in stdenv.mkDerivation ({
|
||||||
fc="`dirname "$s"`/`basename "$s"`.fc"
|
fc="`dirname "$s"`/`basename "$s"`.fc"
|
||||||
echo "fc-scan $s"
|
echo "fc-scan $s"
|
||||||
LANG=C LC_NUMERIC=C fc-scan --format 'family=%{family}
|
LANG=C LC_NUMERIC=C fc-scan --format 'family=%{family}
|
||||||
fullname=%{fullname}
|
fullname=%{fullname}
|
||||||
postscriptname=%{postscriptname}
|
postscriptname=%{postscriptname}
|
||||||
variable=%{variable}
|
variable=%{variable}
|
||||||
slant=%{slant}
|
slant=%{slant}
|
||||||
style=%{style}
|
style=%{style}
|
||||||
weight=%{weight}
|
weight=%{weight}
|
||||||
width=%{width}
|
width=%{width}
|
||||||
|
|
||||||
' "$s" > "$fc"
|
' "$s" > "$fc"
|
||||||
done
|
done
|
||||||
for s in *.woff2
|
for s in *.woff2
|
||||||
do
|
do
|
||||||
|
@ -88,4 +88,9 @@ in stdenv.mkDerivation ({
|
||||||
find "$source_dir" -name \*.html -exec cp \{\} $out/share/doc/${name_} \;
|
find "$source_dir" -name \*.html -exec cp \{\} $out/share/doc/${name_} \;
|
||||||
find "$source_dir" -name \*.css -exec cp \{\} $out/share/doc/${name_} \;
|
find "$source_dir" -name \*.css -exec cp \{\} $out/share/doc/${name_} \;
|
||||||
'';
|
'';
|
||||||
} // (if null != src then { src = src; } else { srcs = srcs; })))
|
} // (
|
||||||
|
if null != src
|
||||||
|
then { src = src; }
|
||||||
|
else { srcs = srcs; }
|
||||||
|
))
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue