From 8ceca9f36b9ca33a55ba857563c9b1e4f7963485 Mon Sep 17 00:00:00 2001 From: uakci Date: Wed, 22 Dec 2021 07:14:59 +0100 Subject: [PATCH 1/2] mplus-outline-fonts: init github release --- .../fonts/mplus-outline-fonts/default.nix | 58 +++++++++++++------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/pkgs/data/fonts/mplus-outline-fonts/default.nix b/pkgs/data/fonts/mplus-outline-fonts/default.nix index 75e8899e664a..b99d984d30cb 100644 --- a/pkgs/data/fonts/mplus-outline-fonts/default.nix +++ b/pkgs/data/fonts/mplus-outline-fonts/default.nix @@ -1,25 +1,45 @@ -{ lib, fetchzip }: +{ lib, fetchzip, fetchFromGitHub }: -let - version = "063a"; -in fetchzip { - name = "mplus-${version}"; +let pname = "mplus-outline-fonts"; +in { + osdnRelease = fetchzip { + name = "${pname}-osdn"; + url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-063a.tar.xz"; + sha256 = "16jirhkjs46ac8cdk2w4xkpv989gmz7i8gnrq9bck13rbil7wlzr"; + postFetch = '' + mkdir -p $out/share/fonts/truetype/${pname} + tar xvJf $downloadedFile + mv */*.ttf $out/share/fonts/truetype/${pname} + ''; - url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-${version}.tar.xz"; + meta = with lib; { + description = "M+ Outline Fonts (legacy OSDN release)"; + homepage = "https://mplus-fonts.osdn.jp"; + maintainers = with maintainers; [ henrytill ]; + platforms = platforms.all; + license = licenses.mit; + }; + }; - postFetch = '' - tar -xJf $downloadedFile --strip-components=1 - mkdir -p $out/share/fonts/truetype - cp *.ttf $out/share/fonts/truetype - ''; + githubRelease = fetchFromGitHub { + name = "${pname}-github"; + owner = "coz-m"; + repo = "MPLUS_FONTS"; + rev = "336fec4e9e7c1e61bd22b82e6364686121cf3932"; + sha256 = "1ha92hyzcfbbq682c50k8clbhigc09rcb9mxjzjwqfj9rfp348id"; + postFetch = '' + mkdir -p $out/share/fonts/{truetype,opentype}/${pname} + tar xvzf $downloadedFile + mv */fonts/ttf/* $out/share/fonts/truetype/${pname} + mv */fonts/otf/* $out/share/fonts/opentype/${pname} + ''; - sha256 = "1khbkch2r96ppifc93bmy1v047pgciyhfmcjb98ggncp5ix885xz"; - - meta = with lib; { - description = "M+ Outline Fonts"; - homepage = "https://mplus-fonts.osdn.jp/about-en.html"; - license = licenses.mit; - maintainers = with maintainers; [ henrytill ]; - platforms = platforms.all; + meta = with lib; { + description = "M+ Outline Fonts (GitHub release)"; + homepage = "https://mplusfonts.github.io"; + maintainers = with maintainers; [ henrytill ]; + platforms = platforms.all; + license = licenses.ofl; + }; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a5ee3327e03c..68361b095caf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24084,7 +24084,7 @@ with pkgs; mph_2b_damase = callPackage ../data/fonts/mph-2b-damase { }; - mplus-outline-fonts = callPackage ../data/fonts/mplus-outline-fonts { }; + mplus-outline-fonts = recurseIntoAttrs (callPackage ../data/fonts/mplus-outline-fonts { }); mro-unicode = callPackage ../data/fonts/mro-unicode { }; From 6c5a2b69b459786834d893986a7ecf201ce92138 Mon Sep 17 00:00:00 2001 From: uakci Date: Wed, 23 Mar 2022 19:27:54 +0100 Subject: [PATCH 2/2] maintainers: add uakci --- maintainers/maintainer-list.nix | 6 ++++++ pkgs/data/fonts/mplus-outline-fonts/default.nix | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 4a66ffa1eafb..e5a755c069e8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -12765,6 +12765,12 @@ githubId = 1983821; name = "Eric Wolf"; }; + uakci = { + name = "uakci"; + email = "uakci@uakci.pl"; + github = "uakci"; + githubId = 6961268; + }; udono = { email = "udono@virtual-things.biz"; github = "udono"; diff --git a/pkgs/data/fonts/mplus-outline-fonts/default.nix b/pkgs/data/fonts/mplus-outline-fonts/default.nix index b99d984d30cb..d9cfadd5f088 100644 --- a/pkgs/data/fonts/mplus-outline-fonts/default.nix +++ b/pkgs/data/fonts/mplus-outline-fonts/default.nix @@ -15,7 +15,7 @@ in { meta = with lib; { description = "M+ Outline Fonts (legacy OSDN release)"; homepage = "https://mplus-fonts.osdn.jp"; - maintainers = with maintainers; [ henrytill ]; + maintainers = with maintainers; [ henrytill uakci ]; platforms = platforms.all; license = licenses.mit; }; @@ -37,7 +37,7 @@ in { meta = with lib; { description = "M+ Outline Fonts (GitHub release)"; homepage = "https://mplusfonts.github.io"; - maintainers = with maintainers; [ henrytill ]; + maintainers = with maintainers; [ henrytill uakci ]; platforms = platforms.all; license = licenses.ofl; };