From c5a0d66eb7cd17880b6238541d4189da6987e711 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Fri, 7 Feb 2020 22:49:24 +0100 Subject: [PATCH] gohufont: split outputs into out and otb --- pkgs/data/fonts/gohufont/default.nix | 34 ++++++++++++++++------------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/pkgs/data/fonts/gohufont/default.nix b/pkgs/data/fonts/gohufont/default.nix index ec36d9230f5b..b331edf7aa1e 100644 --- a/pkgs/data/fonts/gohufont/default.nix +++ b/pkgs/data/fonts/gohufont/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchFromGitHub -, mkfontdir, mkfontscale, bdf2psf, bdftopcf +, mkfontscale, bdf2psf, bdftopcf , fonttosfnt, libfaketime }: @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = - [ mkfontdir mkfontscale bdf2psf bdftopcf + [ mkfontscale bdf2psf bdftopcf fonttosfnt libfaketime ]; @@ -33,33 +33,37 @@ stdenv.mkDerivation rec { done cd $build - # convert bdf fonts to pcf and otb + # convert bdf fonts to pcf for i in *.bdf $src/hidpi/*.bdf; do name=$(basename $i .bdf) bdftopcf -o "$name.pcf" "$i" - faketime -f "1970-01-01 00:00:01" fonttosfnt -v -o "$name.otb" "$i" || true + done + + # convert unicode bdf fonts to otb + for i in *-uni*.bdf $src/hidpi/*-uni*.bdf; do + name=$(basename $i .bdf) + faketime -f "1970-01-01 00:00:01" \ + fonttosfnt -v -o "$name.otb" "$i" done ''; installPhase = '' # install the psf fonts (for the virtual console) fontDir="$out/share/consolefonts" - mkdir -p "$fontDir" - mv -t "$fontDir" psf/*.psf + install -D -m 644 -t "$fontDir" psf/*.psf - # install the pcf and otb fonts (for xorg applications) + # install the pcf fonts (for xorg applications) fontDir="$out/share/fonts/misc" - mkdir -p "$fontDir" - mv -t "$fontDir" *.pcf *.otb + install -D -m 644 -t "$fontDir" *.pcf + mkfontdir "$fontDir" - cd "$fontDir" - mkfontdir - mkfontscale + # install the otb fonts (for gtk applications) + fontDir="$otb/share/fonts/misc" + install -D -m 644 -t "$fontDir" *.otb + mkfontdir "$fontDir" ''; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "028mq0j6w76isv4ycj1jzx7ih9d9cz5012np7f1pf3bvnvw3ajw2"; + outputs = [ "out" "otb" ]; meta = with stdenv.lib; { description = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 90c390ba4156..c292398c9c62 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17494,7 +17494,7 @@ in geolite-legacy = callPackage ../data/misc/geolite-legacy { }; gohufont = callPackage ../data/fonts/gohufont - { inherit (buildPackages.xorg) fonttosfnt mkfontdir; }; + { inherit (buildPackages.xorg) fonttosfnt mkfontscale; }; gnome-user-docs = callPackage ../data/documentation/gnome-user-docs { };