diff options
Diffstat (limited to 'nixpkgs/pkgs/data/fonts/victor-mono/default.nix')
-rw-r--r-- | nixpkgs/pkgs/data/fonts/victor-mono/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/data/fonts/victor-mono/default.nix b/nixpkgs/pkgs/data/fonts/victor-mono/default.nix new file mode 100644 index 000000000000..940c0d76c46a --- /dev/null +++ b/nixpkgs/pkgs/data/fonts/victor-mono/default.nix @@ -0,0 +1,39 @@ +{ lib, fetchFromGitHub }: + +let + pname = "victor-mono"; + version = "1.4.1"; +in fetchFromGitHub rec { + name = "${pname}-${version}"; + + owner = "rubjo"; + repo = pname; + rev = "v${version}"; + + # 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. + postFetch = '' + tar xvf $downloadedFile --strip-components=2 ${pname}-${version}/public/VictorMonoAll.zip + + 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} + ''; + + sha256 = "1g3jjrqd2fiw2hdifhff2fn20p5a0xfma3964f67ibdyri976zq5"; + + meta = with lib; { + description = "Free programming font with cursive italics and ligatures"; + homepage = "https://rubjo.github.io/victor-mono"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ jpotier dtzWill ]; + platforms = platforms.all; + }; +} + |