lol

Merge pull request #329369 from dotlambda/bibtex-tidy

bibtex-tidy: 1.11.0 -> 1.13.0

authored by

Robert Schütz and committed by
GitHub
65f98a68 db77328e

+13 -61
+13 -9
pkgs/tools/typesetting/bibtex-tidy/default.nix
··· 1 1 { lib 2 2 , buildNpmPackage 3 3 , fetchFromGitHub 4 + , testers 5 + , bibtex-tidy 4 6 }: 5 7 6 8 buildNpmPackage rec { 7 9 pname = "bibtex-tidy"; 8 - version = "1.11.0"; 10 + version = "1.13.0"; 9 11 10 12 src = fetchFromGitHub { 11 13 owner = "FlamingTempura"; 12 14 repo = "bibtex-tidy"; 13 - rev = "v${version}"; 14 - hash = "sha256-VjQuMQr3OJgjgX6FdH/C4mehf8H7XjDZ9Rxs92hyQVo="; 15 + rev = "9658d907d990fd80d25ab37d9aee120451bf5d19"; 16 + hash = "sha256-4TrEabxIVB0Vu/E1ClKwk7lXcnPgoVh3RjLYsPwH2yQ="; 15 17 }; 16 18 17 - patches = [ 18 - # downloads Google fonts during `npm run build` 19 - ./remove-google-font-loader.patch 20 - ]; 21 - 22 - npmDepsHash = "sha256-u2lyG95F00S/bvsVwu0hIuUw2UZYQWFakCF31LIijSU="; 19 + npmDepsHash = "sha256-VzzHGmW7Rb6dEdBxd84GXKSPasqfTkn+5rNw9C2lt8k="; 23 20 24 21 env = { 25 22 PUPPETEER_SKIP_DOWNLOAD = true; 23 + }; 24 + 25 + passthru.tests = { 26 + version = testers.testVersion { 27 + package = bibtex-tidy; 28 + version = "v${version}"; 29 + }; 26 30 }; 27 31 28 32 meta = {
-52
pkgs/tools/typesetting/bibtex-tidy/remove-google-font-loader.patch
··· 1 - diff --git a/build.ts b/build.ts 2 - index ae4e350..3498ae7 100644 3 - --- a/build.ts 4 - +++ b/build.ts 5 - @@ -312,7 +312,6 @@ async function buildWebBundle() { 6 - target: ['esnext'], 7 - plugins: [ 8 - sveltePlugin({ preprocess: autoPreprocess() }), 9 - - googleFontPlugin, 10 - regexpuPlugin, 11 - ], 12 - }); 13 - @@ -344,7 +343,6 @@ async function serveWeb() { 14 - preprocess: autoPreprocess(), 15 - compilerOptions: { enableSourcemap: true }, 16 - }), 17 - - googleFontPlugin, 18 - ], 19 - }); 20 - const server = await ctx.serve({ servedir: WEB_PATH }); 21 - @@ -375,31 +373,6 @@ const regexpuPlugin: Plugin = { 22 - }, 23 - }; 24 - 25 - -// Downloads google fonts and injects them as base64 urls into bundle css 26 - -const googleFontPlugin: Plugin = { 27 - - name: 'google-font-loader', 28 - - setup(build) { 29 - - build.onResolve({ filter: /^https?:\/\/fonts\./ }, (args) => ({ 30 - - path: args.path, 31 - - namespace: 'http-url', 32 - - })); 33 - - build.onLoad( 34 - - { filter: /.*/, namespace: 'http-url' }, 35 - - async (args): Promise<OnLoadResult> => { 36 - - const res = await fetch(args.path, { 37 - - headers: { 38 - - // ensures google responds with woff2 fonts 39 - - 'User-Agent': 'Mozilla/5.0 Firefox/90.0', 40 - - }, 41 - - }); 42 - - const contents = Buffer.from(await res.arrayBuffer()); 43 - - const loader = args.path.endsWith('.woff2') ? 'dataurl' : 'css'; 44 - - return { contents, loader }; 45 - - } 46 - - ); 47 - - }, 48 - -}; 49 - - 50 - /** 51 - * swc converts js syntax to support older browsers. ESBuild can kinda do this 52 - * but only for more recent browsers. swc is also far easier to configure than