1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00
nixpkgs/pkgs/data/fonts/unscii/default.nix

56 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, perl, bdftopcf
, fontforge, SDL, SDL_image, mkfontscale
}:
2016-12-15 20:19:39 +00:00
stdenv.mkDerivation rec {
pname = "unscii";
version = "1.1";
2016-12-15 20:19:39 +00:00
src = fetchurl {
url = "http://pelulamu.net/${pname}/${pname}-${version}-src.tar.gz";
2016-12-15 20:19:39 +00:00
sha256 = "0qcxcnqz2nlwfzlrn115kkp3n8dd7593h762vxs6vfqm13i39lq1";
};
nativeBuildInputs =
[ (perl.withPackages (p: [ p.TextCharWidth ]))
bdftopcf fontforge SDL SDL_image
mkfontscale
];
2016-12-15 20:19:39 +00:00
preConfigure = ''
patchShebangs .
'';
postBuild = ''
# compress pcf fonts
gzip -9 -n *.pcf
'';
2016-12-15 20:19:39 +00:00
installPhase = ''
# install fonts for use in X11 and GTK applications
install -m444 -Dt "$out/share/fonts/misc" *.pcf.gz
install -m444 -Dt "$out/share/fonts/opentype" *.otf
mkfontdir "$out/share/fonts/misc"
mkfontscale "$out/share/fonts/opentype"
# install other formats in $extra
install -m444 -Dt "$extra/share/fonts/truetype" *.ttf
install -m444 -Dt "$extra/share/fonts/svg" *.svg
install -m444 -Dt "$extra/share/fonts/web" *.woff
install -m444 -Dt "$extra/share/fonts/misc" *.hex
mkfontscale "$extra"/share/fonts/*
2016-12-15 20:19:39 +00:00
'';
outputs = [ "out" "extra" ];
2016-12-15 20:19:39 +00:00
meta = {
inherit version;
description = ''Bitmapped character-art-friendly Unicode fonts'';
# Basically GPL2+ with font exception — because of the Unifont-augmented
# version. The reduced version is public domain.
license = http://unifoundry.com/LICENSE.txt;
maintainers = [ stdenv.lib.maintainers.raskin ];
homepage = http://pelulamu.net/unscii/;
2016-12-15 20:19:39 +00:00
};
}