summary refs log tree commit diff
path: root/pkgs/data/fonts/eb-garamond
diff options
context:
space:
mode:
authorRicky Elrod <ricky@elrod.me>2014-05-07 03:56:41 -0400
committerVladimír Čunát <vcunat@gmail.com>2014-05-13 12:07:50 +0200
commitb56e41aebe17462a663984dd8a73190582bf7f12 (patch)
tree6aabd499fee3512c6ac8a2a78020fe786c958a9d /pkgs/data/fonts/eb-garamond
parentdd592d7ef363cf7d8922105f8a89f6fd271bbab1 (diff)
downloadnixpkgs-b56e41aebe17462a663984dd8a73190582bf7f12.tar
nixpkgs-b56e41aebe17462a663984dd8a73190582bf7f12.tar.gz
nixpkgs-b56e41aebe17462a663984dd8a73190582bf7f12.tar.bz2
nixpkgs-b56e41aebe17462a663984dd8a73190582bf7f12.tar.lz
nixpkgs-b56e41aebe17462a663984dd8a73190582bf7f12.tar.xz
nixpkgs-b56e41aebe17462a663984dd8a73190582bf7f12.tar.zst
nixpkgs-b56e41aebe17462a663984dd8a73190582bf7f12.zip
Add eb-garamond font (close #2553)
@vcunat added license, changed attribute name according to the [rules],
and trivial refactoring.
[rules]: http://nixos.org/nixpkgs/manual/#idm140333184443184 ("package naming")
Diffstat (limited to 'pkgs/data/fonts/eb-garamond')
-rw-r--r--pkgs/data/fonts/eb-garamond/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/data/fonts/eb-garamond/default.nix b/pkgs/data/fonts/eb-garamond/default.nix
new file mode 100644
index 00000000000..99c9b53217e
--- /dev/null
+++ b/pkgs/data/fonts/eb-garamond/default.nix
@@ -0,0 +1,50 @@
+x@{builderDefsPackage
+  , unzip
+  , ...}:
+builderDefsPackage
+(a :
+let
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    version="0.016";
+    name="EBGaramond";
+    url="https://bitbucket.org/georgd/eb-garamond/downloads/${name}-${version}.zip";
+    hash="0y630khn5zh70al3mm84fs767ac94ffyz1w70zzhrhambx07pdx0";
+  };
+in
+rec {
+  src = a.fetchurl {
+    url = sourceInfo.url;
+    sha256 = sourceInfo.hash;
+  };
+
+  name = "eb-garamond-${sourceInfo.version}";
+  inherit buildInputs;
+
+  phaseNames = ["doUnpack" "installFonts"];
+
+  # This will clean up if/when 8263996 lands.
+  doUnpack = a.fullDepEntry (''
+    unzip ${src}
+    cd ${sourceInfo.name}*
+    mv {ttf,otf}/* .
+  '') ["addInputs"];
+
+  meta = with a.lib; {
+    description = "Digitization of the Garamond shown on the Egenolff-Berner specimen";
+    maintainers = with maintainers; [ relrod ];
+    platforms = platforms.all;
+    license = licenses.ofl;
+    homepage = http://www.georgduffner.at/ebgaramond/;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "https://github.com/georgd/EB-Garamond/releases";
+    };
+  };
+}) x
+