Skip to content

Commit

Permalink
78 fonts: Fix build after NixOS#173430 changed postFetch semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
chkno authored and Artturin committed Jan 16, 2023
1 parent ea27fb0 commit af89d3a
Show file tree
Hide file tree
Showing 72 changed files with 672 additions and 584 deletions.
16 changes: 9 additions & 7 deletions pkgs/data/fonts/andagii/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
version = "1.0.2";
in fetchzip {
in (fetchzip {
name = "andagii-${version}";

url = "http://www.i18nguy.com/unicode/andagii.zip";
curlOpts = "--user-agent 'Mozilla/5.0'";
postFetch = ''
unzip $downloadedFile
mkdir -p $out/share/fonts/truetype
cp -v ANDAGII_.TTF $out/share/fonts/truetype/andagii.ttf
'';
sha256 = "0j5kf2fmyqgnf5ji6h0h79lq9n9d85hkfrr4ya8hqj4gwvc0smb2";

# There are multiple claims that the font is GPL, so I include the
Expand All @@ -24,4 +20,10 @@ in fetchzip {
license = "unknown";
platforms = platforms.all;
};
}
}).overrideAttrs (_: {
postFetch = ''
unzip $downloadedFile
mkdir -p $out/share/fonts/truetype
cp -v ANDAGII_.TTF $out/share/fonts/truetype/andagii.ttf
'';
})
20 changes: 11 additions & 9 deletions pkgs/data/fonts/andika/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
version = "6.101";
name = "andika-${version}";
in
fetchzip rec {
name = "andika-${version}";
(fetchzip rec {
inherit name;

url = "https://software.sil.org/downloads/r/andika/Andika-${version}.zip";

postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*OFL.txt \*OFL-FAQ.txt \*README.txt \*FONTLOG.txt -d "$out/share/doc/${name}"
'';

sha256 = "sha256-J/Ad+fmCMOxLoo+691LE6Bgi/l3ovIfWScwwVWtqACI=";

meta = with lib; {
Expand All @@ -28,4 +24,10 @@ in
platforms = platforms.all;
maintainers = [ maintainers.f--t ];
};
}
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*OFL.txt \*OFL-FAQ.txt \*README.txt \*FONTLOG.txt -d "$out/share/doc/${name}"
'';
})
17 changes: 9 additions & 8 deletions pkgs/data/fonts/ankacoder/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let version = "1.100"; in
fetchzip {
(fetchzip {
name = "ankacoder-${version}";
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/anka-coder-fonts/AnkaCoder.${version}.zip";

postFetch = ''
unzip $downloadedFile
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
'';

sha256 = "1jqx9micfmiarqh9xp330gl96v3vxbwzz9cmg2vi845n9md4im85";

meta = with lib; {
Expand All @@ -20,4 +15,10 @@ fetchzip {
maintainers = with maintainers; [ dtzWill ];
platforms = platforms.all;
};
}
}).overrideAttrs (_: {
postFetch = ''
unzip $downloadedFile
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
'';
})
20 changes: 11 additions & 9 deletions pkgs/data/fonts/annapurna-sil/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
version = "1.204";
name = "annapurna-sil-${version}";
in
fetchzip rec {
name = "annapurna-sil-${version}";
(fetchzip rec {
inherit name;

url = "https://software.sil.org/downloads/r/annapurna/AnnapurnaSIL-${version}.zip";

postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*OFL.txt \*OFL-FAQ.txt \*README.txt \*FONTLOG.txt -d "$out/share/doc/${name}"
'';

sha256 = "sha256-kVeP9ZX8H+Wn6jzmH1UQvUKY6vJjadMTdEusS7LodFM=";

meta = with lib; {
Expand All @@ -26,4 +22,10 @@ in
platforms = platforms.all;
maintainers = [ maintainers.kmein ];
};
}
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*OFL.txt \*OFL-FAQ.txt \*README.txt \*FONTLOG.txt -d "$out/share/doc/${name}"
'';
})
14 changes: 8 additions & 6 deletions pkgs/data/fonts/babelstone-han/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
version = "13.0.3";
in fetchzip {
in (fetchzip {
name = "babelstone-han-${version}";

# upstream download links are unversioned, so hash changes
url = "https://web.archive.org/web/20200210125314/https://www.babelstone.co.uk/Fonts/Download/BabelStoneHan.zip";
postFetch = ''
mkdir -p $out/share/fonts/truetype
unzip $downloadedFile '*.ttf' -d $out/share/fonts/truetype
'';
sha256 = "018isk3hbzsihzrxavgjbn485ngzvlm96npqx9y7zpkxsssslc4w";

meta = with lib; {
Expand All @@ -21,4 +18,9 @@ in fetchzip {
platforms = platforms.all;
maintainers = with maintainers; [ emily ];
};
}
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/share/fonts/truetype
unzip $downloadedFile '*.ttf' -d $out/share/fonts/truetype
'';
})
21 changes: 11 additions & 10 deletions pkgs/data/fonts/barlow/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:
let
version = "1.422";
in
fetchzip rec {
(fetchzip rec {
name = "barlow-${version}";

url = "https://tribby.com/fonts/barlow/download/barlow-${version}.zip";

sha256 = "08ld4c3zq4d1px07lc64i7l8848zsc61ddy3654w2sh0hx5sm5ld";

meta = with lib; {
description = "A grotesk variable font superfamily";
homepage = "https://tribby.com/fonts/barlow/";
license = licenses.ofl;
maintainers = [ maintainers.marsam ];
platforms = platforms.all;
};
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/share/fonts/
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
Expand All @@ -17,12 +26,4 @@ fetchzip rec {
unzip -j $downloadedFile \*.woff -d $out/share/fonts/woff
unzip -j $downloadedFile \*.woff2 -d $out/share/fonts/woff2
'';

meta = with lib; {
description = "A grotesk variable font superfamily";
homepage = "https://tribby.com/fonts/barlow/";
license = licenses.ofl;
maintainers = [ maintainers.marsam ];
platforms = platforms.all;
};
}
})
15 changes: 8 additions & 7 deletions pkgs/data/fonts/borg-sans-mono/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
pname = "borg-sans-mono";
version = "0.2.0";
in
fetchzip {
(fetchzip {
name = "${pname}-${version}";

# https://github.com/marnen/borg-sans-mono/issues/19
url = "https://github.com/marnen/borg-sans-mono/files/107663/BorgSansMono.ttf.zip";
sha256 = "1gz4ab0smw76ih5cs2l3n92c77nv7ld5zghq42avjsfhxrc2n5ri";

postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
'';

meta = with lib; {
description = "Droid Sans Mono Slashed + Hasklig-style ligatures";
homepage = "https://github.com/marnen/borg-sans-mono";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ atila ];
};
}
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
'';
})
17 changes: 9 additions & 8 deletions pkgs/data/fonts/cascadia-code/default.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:
let
version = "2111.01";
in
fetchzip {
(fetchzip {
name = "cascadia-code-${version}";

url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaCode-${version}.zip";

sha256 = "sha256-kUVTQ/oMZztNf22sDbQBpQW0luSc5nr5sxWU5etLDec=";

postFetch = ''
mkdir -p $out/share/fonts/
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
'';

meta = with lib; {
description = "Monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal";
homepage = "https://github.com/microsoft/cascadia-code";
Expand All @@ -23,4 +18,10 @@ fetchzip {
maintainers = [ maintainers.marsam ];
platforms = platforms.all;
};
}
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/share/fonts/
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
'';
})
20 changes: 11 additions & 9 deletions pkgs/data/fonts/charis-sil/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
version = "6.101";
name = "charis-sil-${version}";
in
fetchzip rec {
name = "charis-sil-${version}";
(fetchzip rec {
inherit name;

url = "https://software.sil.org/downloads/r/charis/CharisSIL-${version}.zip";

postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*OFL.txt \*OFL-FAQ.txt \*README.txt \*FONTLOG.txt -d "$out/share/doc/${name}"
'';

sha256 = "sha256-b1ms9hJ6IPe7W6O9KgzHZvwT4/nAoLOhdydcUrwNfnU=";

meta = with lib; {
Expand All @@ -28,4 +24,10 @@ in
platforms = platforms.all;
maintainers = [ maintainers.f--t ];
};
}
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/share/{doc,fonts}
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile \*OFL.txt \*OFL-FAQ.txt \*README.txt \*FONTLOG.txt -d "$out/share/doc/${name}"
'';
})
24 changes: 13 additions & 11 deletions pkgs/data/fonts/comic-relief/default.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
version = "1.1";
in fetchzip rec {
name = "comic-relief-${version}";
in (fetchzip rec {
inherit name;

url = "https://fontlibrary.org/assets/downloads/comic-relief/45c456b6db2aaf2f7f69ac66b5ac7239/comic-relief.zip";

postFetch = ''
mkdir -p $out/etc/fonts/conf.d
mkdir -p $out/share/doc/${name}
mkdir -p $out/share/fonts/truetype
cp -v ${./comic-sans-ms-alias.conf} $out/etc/fonts/conf.d/30-comic-sans-ms.conf
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile FONTLOG.txt -d $out/share/doc/${name}
'';

sha256 = "0dz0y7w6mq4hcmmxv6fn4mp6jkln9mzr4s96vsg68wrl5b7k9yff";

meta = with lib; {
Expand All @@ -37,4 +30,13 @@ in fetchzip rec {
# want to install the font alias of this package.
priority = 10;
};
}
}).overrideAttrs (_: {
postFetch = ''
mkdir -p $out/etc/fonts/conf.d
mkdir -p $out/share/doc/${name}
mkdir -p $out/share/fonts/truetype
cp -v ${./comic-sans-ms-alias.conf} $out/etc/fonts/conf.d/30-comic-sans-ms.conf
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile FONTLOG.txt -d $out/share/doc/${name}
'';
})
15 changes: 8 additions & 7 deletions pkgs/data/fonts/courier-prime/default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:

let
version = "unstable-2019-12-05";
repo = "CourierPrime";
rev = "7f6d46a766acd9391d899090de467c53fd9c9cb0";
in fetchzip rec {
in (fetchzip rec {
name = "courier-prime-${version}";
url = "https://github.com/quoteunquoteapps/${repo}/archive/${rev}/${name}.zip";
sha256 = "1xh4pkksm6zrafhb69q4lq093q6pl245zi9qhqw3x6c1ab718704";

postFetch = ''
unzip $downloadedFile
install -m444 -Dt $out/share/fonts/truetype ${repo}-${rev}/fonts/ttf/*.ttf
'';

meta = with lib; {
description = "Monospaced font designed specifically for screenplays";
homepage = "https://github.com/quoteunquoteapps/CourierPrime";
license = licenses.ofl;
maintainers = [ maintainers.austinbutler ];
platforms = platforms.all;
};
}
}).overrideAttrs (_: {
postFetch = ''
unzip $downloadedFile
install -m444 -Dt $out/share/fonts/truetype ${repo}-${rev}/fonts/ttf/*.ttf
'';
})
Loading

0 comments on commit af89d3a

Please sign in to comment.