at v206 48 lines 1.7 kB view raw
1{ stdenv, fetchurl, unzip }: 2 3let version = "2.015"; in 4stdenv.mkDerivation { 5 name = "hack-font-${version}"; 6 7 src = let 8 version_ = with stdenv.lib; 9 concatStringsSep "_" (splitString "." version); 10 in fetchurl { 11 sha256 = "0x0c3wwxiidl5a6axbcwizxny5q2yc6l4724smdj4gmn1xa137g5"; 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 inherit version; 26 description = "A typeface designed for source code"; 27 longDescription = '' 28 Hack is hand groomed and optically balanced to be a workhorse face for 29 code. It has deep roots in the libre, open source typeface community and 30 expands upon the contributions of the Bitstream Vera & DejaVu projects. 31 The face has been re-designed with a larger glyph set, modifications of 32 the original glyph shapes, and meticulous attention to metrics. 33 ''; 34 homepage = http://sourcefoundry.org/hack/; 35 36 /* 37 "The font binaries are released under a license that permits unlimited 38 print, desktop, and web use for commercial and non-commercial 39 applications. It may be embedded and distributed in documents and 40 applications. The source is released in the widely supported UFO format 41 and may be modified to derive new typeface branches. The full text of 42 the license is available in LICENSE.md" (From the GitHub page) 43 */ 44 license = licenses.free; 45 platforms = platforms.all; 46 maintainers = with maintainers; [ nckx ]; 47 }; 48}