diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2010-11-24 11:19:38 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2010-11-24 11:19:38 +0000 |
commit | a94fc3966dafef8298e01eda4b5a29bec88bd880 (patch) | |
tree | 885ceda1d802006985175d1667633a0eb730ea75 /pkgs/data | |
parent | 0dcd86ef0fc11751166b460485a2fcc8c5298a11 (diff) |
Add inconsolata font
svn path=/nixpkgs/trunk/; revision=24839
Diffstat (limited to 'pkgs/data')
-rw-r--r-- | pkgs/data/fonts/inconsolata/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/data/fonts/inconsolata/default.nix b/pkgs/data/fonts/inconsolata/default.nix new file mode 100644 index 0000000000000..953b677b08006 --- /dev/null +++ b/pkgs/data/fonts/inconsolata/default.nix @@ -0,0 +1,51 @@ +x@{builderDefsPackage + , fontforge + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + name="inconsolata"; + url="http://www.levien.com/type/myfonts/Inconsolata.sfd"; + hash="1cd29c8396adb18bfeddb1abf5bdb98b677649bb9b09f126d1335b123a4cfddb"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["copySrc" "generateFontsFromSFD" "installFonts"]; + + copySrc = a.fullDepEntry ('' + cp ${src} inconsolata.sfd + '') ["minInit"]; + + generateFontsFromSFD = a.generateFontsFromSFD // {deps=["addInputs"];}; + + meta = { + description = "A monospace font for both screen and print"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + all; + }; + passthru = { + updateInfo = { + downloadPage = "http://www.levien.com/type/myfonts/inconsolata.html"; + }; + }; +}) x + |