clearlyU: split outputs in out and otb

This commit is contained in:
rnhmjoj 2020-02-09 18:21:26 +01:00
parent f16019c58f
commit 76dd114376
No known key found for this signature in database
GPG Key ID: BFBAF4C975F76450
2 changed files with 30 additions and 17 deletions

View File

@ -1,29 +1,41 @@
{ stdenv, fetchurl, mkfontdir, mkfontscale }:
{ stdenv, fetchurl, fonttosfnt, mkfontscale, libfaketime }:
stdenv.mkDerivation {
name = "clearlyU-12-1.9";
stdenv.mkDerivation rec {
pname = "clearlyU";
version = "12-1.9";
src = fetchurl {
url = https://www.math.nmsu.edu/~mleisher/Software/cu/cu12-1.9.tgz;
url = "https://www.math.nmsu.edu/~mleisher/Software/cu/cu${version}.tgz";
sha256 = "1xn14jbv3m1khy7ydvad9ydkn7yygdbhjy9wm1v000jzjwr3lv21";
};
nativeBuildInputs = [ mkfontdir mkfontscale ];
nativeBuildInputs = [ fonttosfnt mkfontscale libfaketime ];
installPhase = ''
mkdir -p $out/share/fonts
cp *.bdf $out/share/fonts
cd $out/share/fonts
mkfontdir
mkfontscale
buildPhase = ''
# convert bdf fonts to otb
for i in *.bdf; do
name=$(basename "$i" .bdf)
faketime -f "1970-01-01 00:00:01" fonttosfnt -g 2 -m 2 -v -o "$name.otb" "$i"
done
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "127zrg65s90ksj99kr9hxny40rbxvpai62mf5nqk853hcd1bzpr6";
installPhase = ''
# install bdf fonts
fontDir="$out/share/fonts"
install -m 644 -D *.bdf -t "$fontDir"
mkfontdir "$fontDir"
meta = {
# install otb fonts
fontDir="$otb/share/fonts"
install -m 644 -D *.otb -t "$fontDir"
mkfontdir "$fontDir"
'';
outputs = [ "out" "otb" ];
meta = with stdenv.lib; {
description = "A Unicode font";
maintainers = [stdenv.lib.maintainers.raskin];
license = licenses.mit;
maintainers = [ maintainers.raskin ];
};
}

View File

@ -17362,7 +17362,8 @@ in
culmus = callPackage ../data/fonts/culmus { };
clearlyU = callPackage ../data/fonts/clearlyU { };
clearlyU = callPackage ../data/fonts/clearlyU
{ inherit (buildPackages.xorg) fonttosfnt mkfontscale; };
cm_unicode = callPackage ../data/fonts/cm-unicode {};