depot/third_party/nixpkgs/pkgs/data/fonts/victor-mono/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

38 lines
1.1 KiB
Nix

{ lib, stdenvNoCC, fetchzip }:
stdenvNoCC.mkDerivation rec {
pname = "victor-mono";
version = "1.5.4";
# 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.
src = fetchzip {
url = "https://github.com/rubjo/victor-mono/raw/v${version}/public/VictorMonoAll.zip";
stripRoot = false;
hash = "sha256-E8j1bfYrM8yRtasiwgTvyE4EYx2LyAbmw3MXH1l+owk=";
};
installPhase = ''
runHook preInstall
mkdir -p "$out/share/fonts/"
mv OTF $out/share/fonts/opentype
mv TTF $out/share/fonts/truetype
runHook postInstall
'';
meta = with lib; {
description = "Free programming font with cursive italics and ligatures";
homepage = "https://rubjo.github.io/victor-mono";
license = licenses.ofl;
maintainers = with maintainers; [ jpotier dtzWill ];
platforms = platforms.all;
};
}