2015-09-14 22:47:58 +00:00
|
|
|
{ stdenv, fetchurl, unzip }:
|
|
|
|
|
2016-01-24 19:31:44 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-09-14 22:47:58 +00:00
|
|
|
name = "hack-font-${version}";
|
2016-01-24 19:31:44 +00:00
|
|
|
version = "2.019";
|
2015-09-14 22:47:58 +00:00
|
|
|
|
|
|
|
src = let
|
|
|
|
version_ = with stdenv.lib;
|
|
|
|
concatStringsSep "_" (splitString "." version);
|
|
|
|
in fetchurl {
|
2016-01-18 01:51:17 +00:00
|
|
|
sha256 = "0fhrl7y5z3d5fkiycbsi621f8nzfnpz8khxpd6hkc1hrg7nzmrk4";
|
2015-09-14 22:47:58 +00:00
|
|
|
url = "https://github.com/chrissimpkins/Hack/releases/download/v${version}/Hack-v${version_}-ttf.zip";
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/fonts/hack
|
|
|
|
cp *.ttf $out/share/fonts/hack
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A typeface designed for source code";
|
|
|
|
longDescription = ''
|
|
|
|
Hack is hand groomed and optically balanced to be a workhorse face for
|
|
|
|
code. It has deep roots in the libre, open source typeface community and
|
|
|
|
expands upon the contributions of the Bitstream Vera & DejaVu projects.
|
|
|
|
The face has been re-designed with a larger glyph set, modifications of
|
|
|
|
the original glyph shapes, and meticulous attention to metrics.
|
|
|
|
'';
|
|
|
|
homepage = http://sourcefoundry.org/hack/;
|
|
|
|
|
|
|
|
/*
|
|
|
|
"The font binaries are released under a license that permits unlimited
|
|
|
|
print, desktop, and web use for commercial and non-commercial
|
|
|
|
applications. It may be embedded and distributed in documents and
|
|
|
|
applications. The source is released in the widely supported UFO format
|
|
|
|
and may be modified to derive new typeface branches. The full text of
|
|
|
|
the license is available in LICENSE.md" (From the GitHub page)
|
|
|
|
*/
|
|
|
|
license = licenses.free;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ nckx ];
|
|
|
|
};
|
|
|
|
}
|