nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 67 lines 1.6 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchurl, 5 fetchFromGitHub, 6}: 7 8let 9 pname = "mplus-outline-fonts"; 10in 11{ 12 osdnRelease = stdenvNoCC.mkDerivation { 13 pname = "${pname}-osdn"; 14 version = "063a"; 15 16 src = fetchurl { 17 url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-063a.tar.xz"; 18 hash = "sha256-ROuXO0tq/1dN5FTbEF3cI+Z0nCKUc0vZyx4Nc05M3Xk="; 19 }; 20 21 installPhase = '' 22 runHook preInstall 23 24 install -m444 -Dt $out/share/fonts/truetype/${pname} *.ttf 25 26 runHook postInstall 27 ''; 28 29 meta = with lib; { 30 description = "M+ Outline Fonts (legacy OSDN release)"; 31 homepage = "https://mplus-fonts.osdn.jp"; 32 maintainers = with maintainers; [ uakci ]; 33 platforms = platforms.all; 34 license = licenses.mplus; 35 }; 36 }; 37 38 githubRelease = stdenvNoCC.mkDerivation { 39 pname = "${pname}-github"; 40 version = "unstable-2022-05-19"; 41 42 src = fetchFromGitHub { 43 owner = "coz-m"; 44 repo = "MPLUS_FONTS"; 45 rev = "336fec4e9e7c1e61bd22b82e6364686121cf3932"; 46 hash = "sha256-jzDDUs1dKjqNjsMeTA2/4vm+akIisnOuE2mPQS7IDSA="; 47 }; 48 49 installPhase = '' 50 runHook preInstall 51 52 mkdir -p $out/share/fonts/{truetype,opentype}/${pname} 53 mv fonts/ttf/* $out/share/fonts/truetype/${pname} 54 mv fonts/otf/* $out/share/fonts/opentype/${pname} 55 56 runHook postInstall 57 ''; 58 59 meta = with lib; { 60 description = "M+ Outline Fonts (GitHub release)"; 61 homepage = "https://mplusfonts.github.io"; 62 maintainers = with maintainers; [ uakci ]; 63 platforms = platforms.all; 64 license = licenses.ofl; 65 }; 66 }; 67}