2019-07-13 09:00:39 +01:00
|
|
|
{ lib, fetchFromGitHub }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "victor-mono";
|
2019-10-23 17:38:17 +01:00
|
|
|
version = "1.2.7";
|
2019-07-18 00:27:26 +01:00
|
|
|
in fetchFromGitHub rec {
|
2019-07-13 09:00:39 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
owner = "rubjo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
|
2019-07-18 00:27:26 +01:00
|
|
|
# Upstream prefers we download from the website,
|
|
|
|
# but we really insist on a more versioned resource.
|
|
|
|
# Happily, tagged releases on github contain the same
|
|
|
|
# file `VictorMonoAll.zip` as from the website,
|
|
|
|
# so we extract it from the tagged release.
|
|
|
|
# Both methods produce the same file, but this way
|
|
|
|
# we can safely reason about what version it is.
|
2019-07-13 09:00:39 +01:00
|
|
|
postFetch = ''
|
2019-10-23 17:38:17 +01:00
|
|
|
tar xvf $downloadedFile --strip-components=2 ${pname}-${version}/public/VictorMonoAll.zip
|
2019-07-18 00:27:26 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/fonts/{true,open}type/${pname}
|
|
|
|
|
|
|
|
unzip -j VictorMonoAll.zip \*.ttf -d $out/share/fonts/truetype/${pname}
|
|
|
|
unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname}
|
2019-07-13 09:00:39 +01:00
|
|
|
'';
|
|
|
|
|
2019-10-23 17:38:17 +01:00
|
|
|
sha256 = "0x4ydp11ry94wkkspnmy1xpzqq3m45xg60z1hq4ll9gmlccaknj0";
|
2019-07-13 09:00:39 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2019-07-18 00:27:26 +01:00
|
|
|
description = "Free programming font with cursive italics and ligatures";
|
|
|
|
homepage = "https://rubjo.github.io/victor-mono";
|
2019-07-13 09:00:39 +01:00
|
|
|
license = with licenses; [ mit ];
|
2019-07-18 00:27:26 +01:00
|
|
|
maintainers = with maintainers; [ jpotier dtzWill ];
|
2019-07-13 09:00:39 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|
2019-07-18 00:27:26 +01:00
|
|
|
|