From 8f03d888c3bce8ec35d5e8ef7bf5615de1ecacc9 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Tue, 1 Jul 2014 12:20:04 +0400 Subject: [PATCH] Allow auto-updating of the AnonymousPro font --- pkgs/data/fonts/anonymous-pro/default.nix | 13 +++++-------- pkgs/data/fonts/anonymous-pro/default.upstream | 6 ++++++ 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 pkgs/data/fonts/anonymous-pro/default.upstream diff --git a/pkgs/data/fonts/anonymous-pro/default.nix b/pkgs/data/fonts/anonymous-pro/default.nix index cca775d941e1..5b51ee36c5c7 100644 --- a/pkgs/data/fonts/anonymous-pro/default.nix +++ b/pkgs/data/fonts/anonymous-pro/default.nix @@ -10,16 +10,16 @@ let buildInputs = map (n: builtins.getAttr n x) (builtins.attrNames (builtins.removeAttrs x helperArgNames)); sourceInfo = rec { - version="1.002"; + version = "1.002"; name="anonymousPro"; url="http://www.ms-studio.com/FontSales/AnonymousPro-${version}.zip"; - hash="86665847a51cdfb58a1e1dfd8b1ba33f183485affe50b53e3304f63d3d3552ab"; + sha256 = "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"; }; in rec { src = a.fetchurl { url = sourceInfo.url; - sha256 = sourceInfo.hash; + sha256 = sourceInfo.sha256; }; name = "${sourceInfo.name}-${sourceInfo.version}"; @@ -43,11 +43,8 @@ rec { license = with a.lib.licenses; ofl; hydraPlatforms = []; homepage = "http://www.marksimonson.com/fonts/view/anonymous-pro"; - }; - passthru = { - updateInfo = { - downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html"; - }; + downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html"; + inherit (sourceInfo) version; }; }) x diff --git a/pkgs/data/fonts/anonymous-pro/default.upstream b/pkgs/data/fonts/anonymous-pro/default.upstream new file mode 100644 index 000000000000..dde536cbcae1 --- /dev/null +++ b/pkgs/data/fonts/anonymous-pro/default.upstream @@ -0,0 +1,6 @@ +attribute_name anonymousPro +url http://www.ms-studio.com/FontSales/anonymouspro.html +version_link '/AnonymousPro-.*[.]zip$' +do_overwrite (){ + do_overwrite_just_version +}