1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

fira-code: make the font derivation fixed-output

- [x] make the font derivation fixed-output (https://github.com/NixOS/nixpkgs/issues/27754)
This commit is contained in:
volth 2017-08-11 13:42:16 +00:00 committed by GitHub
parent 973ebce996
commit 265744f2e0

View file

@ -1,24 +1,19 @@
{ stdenv, fetchurl, unzip }:
{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
name = "fira-code-${version}";
let
version = "1.204";
in fetchzip {
name = "fira-code-${version}";
src = fetchurl {
url = "https://github.com/tonsky/FiraCode/releases/download/${version}/FiraCode_${version}.zip";
sha256 = "17wky221b3igrqhmxgmqiyv1xdfn0nw471vzhpkrvv1w2w1w1k18";
};
url = "https://github.com/tonsky/FiraCode/releases/download/${version}/FiraCode_${version}.zip";
sourceRoot = "otf";
buildInputs = [ unzip ];
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mkdir -p $out/share/fonts/opentype
cp -v *.otf $out/share/fonts/opentype
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
'';
sha256 = "0gngbnrq42ysz13w3s227ghv1yigw399r3w2415ipb5pba8vipad";
meta = with stdenv.lib; {
homepage = https://github.com/tonsky/FiraCode;
description = "Monospace font with programming ligatures";