acr-cli: init at 0.14 (#359508)
[NixPkgs.git] / pkgs / by-name / ro / roboto-mono / package.nix
blob5d7cc57a4b435b1a27d0236d3baaf3d60bffd35f
1 { lib, stdenv, fetchurl }:
3 let
4   # Latest commit touching the robotomono tree
5   commit = "5338537ef835a3d9ccf8faf386399f13a30605e2";
6 in
7 stdenv.mkDerivation {
8   pname = "roboto-mono";
9   version = "2.002-20190125";
11   srcs = [
12     (fetchurl {
13       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-Regular.ttf";
14       sha256 = "1f96r4by67hzqpr4p2wkrfnpj9b7x9qrmwns0312w2l2rnp2qajx";
15     })
16     (fetchurl {
17       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-Bold.ttf";
18       sha256 = "10wg4dchdq4s89r9pd4h8y5l1bf8mix32pksph2wafyr3815kfnm";
19     })
20     (fetchurl {
21       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-Italic.ttf";
22       sha256 = "1cayhm3wj36q748xd0zdgrhm4pz7wnrskrlf7khxx2s41m3win5b";
23     })
24     (fetchurl {
25       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-BoldItalic.ttf";
26       sha256 = "04238dxizdlhnnnyzhnqckxf8ciwlnwyzxby6qgpyg232abx0n2z";
27     })
28     (fetchurl {
29       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-Medium.ttf";
30       sha256 = "00rh49d0dbycbkjgd2883w7iqzd6hcry08ycjipsvk091p5nq6qy";
31     })
32     (fetchurl {
33       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-MediumItalic.ttf";
34       sha256 = "0fxl6lblj7anhqmhplnpvjwckjh4g8m6r9jykxdrvpl5hk8mr65b";
35     })
36     (fetchurl {
37       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-Light.ttf";
38       sha256 = "1h8rbc2p70fabkplsafzah1wcwy92qc1wzkmc1cnb4yq28gxah4a";
39     })
40     (fetchurl {
41       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-LightItalic.ttf";
42       sha256 = "08y2qngwy61mc22f8i00gshgmcf7hwmfxh1f4j824svy4n16zhsc";
43     })
44     (fetchurl {
45       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-Thin.ttf";
46       sha256 = "0fmij9zlfjiyf0vb8n8gvrwi35l830zpmkbhcy1xgx0m8za6mmmy";
47     })
48     (fetchurl {
49       url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotomono/RobotoMono-ThinItalic.ttf";
50       sha256 = "0mpwdhjnsk8311nw8fqzy1b7v0wzb4pw639ply1j38a0vibrsmn7";
51     })
52   ];
54   sourceRoot = ".";
56   unpackCmd = ''
57     ttfName=$(basename $(stripHash $curSrc))
58     cp $curSrc ./$ttfName
59   '';
61   installPhase = ''
62     mkdir -p $out/share/fonts/truetype
63     cp -a *.ttf $out/share/fonts/truetype/
64   '';
66   outputHashAlgo = "sha256";
67   outputHashMode = "recursive";
68   outputHash = "0fkx2z97k29n1392bf76iwdyz44yp86hmqah7ai6bikzlia38qa0";
70   meta = with lib; {
71     homepage = "https://www.google.com/fonts/specimen/Roboto+Mono";
72     description = "Google Roboto Mono fonts";
73     longDescription = ''
74       Roboto Mono is a monospaced addition to the Roboto type family. Like
75       the other members of the Roboto family, the fonts are optimized for
76       readability on screens across a wide variety of devices and reading
77       environments. While the monospaced version is related to its variable
78       width cousin, it doesn't hesitate to change forms to better fit the
79       constraints of a monospaced environment. For example, narrow glyphs
80       like 'I', 'l' and 'i' have added serifs for more even texture while
81       wider glyphs are adjusted for weight. Curved caps like 'C' and 'O'
82       take on the straighter sides from Roboto Condensed.
83     '';
84     license = licenses.asl20;
85     platforms = platforms.all;
86     maintainers = [ maintainers.romildo ];
87   };