nixpkgs/pkgs/data/fonts/unifont/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

44 lines
1.2 KiB
Nix

{ stdenv, fetchurl, mkfontscale, mkfontdir }:
stdenv.mkDerivation rec {
pname = "unifont";
version = "12.1.03";
ttf = fetchurl {
url = "mirror://gnu/unifont/${pname}-${version}/${pname}-${version}.ttf";
sha256 = "10igjlf05d97h3vcggr2ahxmq9ljby4ypja2g4s9bvxs2w1si51p";
};
pcf = fetchurl {
url = "mirror://gnu/unifont/${pname}-${version}/${pname}-${version}.pcf.gz";
sha256 = "1cd1fnk3m7giqp099kynnjj4m7q00lqm4ybqb1vzd2wi3j4a1awf";
};
nativeBuildInputs = [ mkfontscale mkfontdir ];
phases = "installPhase";
installPhase =
''
mkdir -p $out/share/fonts $out/share/fonts/truetype
cp -v ${pcf} $out/share/fonts/unifont.pcf.gz
cp -v ${ttf} $out/share/fonts/truetype/unifont.ttf
cd $out/share/fonts
mkfontdir
mkfontscale
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0n3ms2k2mk7j6144l05c45smggwf3j5cwkaxhw93wf9hd1lhpwq1";
meta = with stdenv.lib; {
description = "Unicode font for Base Multilingual Plane";
homepage = http://unifoundry.com/unifont.html;
# Basically GPL2+ with font exception.
license = http://unifoundry.com/LICENSE.txt;
maintainers = [ maintainers.rycee maintainers.vrthra ];
platforms = platforms.all;
};
}