at 16.09-beta 47 lines 1.7 kB view raw
1{ stdenv, fetchurl, unzip }: 2 3stdenv.mkDerivation rec { 4 name = "hack-font-${version}"; 5 version = "2.020"; 6 7 src = let 8 version_ = with stdenv.lib; 9 concatStringsSep "_" (splitString "." version); 10 in fetchurl { 11 sha256 = "16kkmc3psckw1b7k07ccn1gi5ymhlg9djh43nqjzg065g6p6d184"; 12 url = "https://github.com/chrissimpkins/Hack/releases/download/v${version}/Hack-v${version_}-ttf.zip"; 13 }; 14 15 sourceRoot = "."; 16 17 nativeBuildInputs = [ unzip ]; 18 19 installPhase = '' 20 mkdir -p $out/share/fonts/hack 21 cp *.ttf $out/share/fonts/hack 22 ''; 23 24 meta = with stdenv.lib; { 25 description = "A typeface designed for source code"; 26 longDescription = '' 27 Hack is hand groomed and optically balanced to be a workhorse face for 28 code. It has deep roots in the libre, open source typeface community and 29 expands upon the contributions of the Bitstream Vera & DejaVu projects. 30 The face has been re-designed with a larger glyph set, modifications of 31 the original glyph shapes, and meticulous attention to metrics. 32 ''; 33 homepage = http://sourcefoundry.org/hack/; 34 35 /* 36 "The font binaries are released under a license that permits unlimited 37 print, desktop, and web use for commercial and non-commercial 38 applications. It may be embedded and distributed in documents and 39 applications. The source is released in the widely supported UFO format 40 and may be modified to derive new typeface branches. The full text of 41 the license is available in LICENSE.md" (From the GitHub page) 42 */ 43 license = licenses.free; 44 platforms = platforms.all; 45 maintainers = with maintainers; [ nckx ]; 46 }; 47}