Generic progress

This commit is contained in:
Jan Bulthuis committed 2024-07-18 22:21:06 +02:00
1 parent dd327a977a
commit 4f49ea8383
15 files changed
+173 -31

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
with lib;
let
mkPackage = path: (mkOption {
type = types.package;
default = (pkgs.callPackage path) {};
description = (mkPackage path).default.name;
});
in {
options.pkgs = {
# Add all custom packages
wqy-zenhei = mkPackage ./fonts/wqy-zenhei.nix;
wqy-microhei = mkPackage ./fonts/wqy-microhei.nix;
wqy-bitmapsong = mkPackage ./fonts/wqy-bitmapsong.nix;
};
}
+33
View File
@@ -0,0 +1,33 @@
{ lib, config, pkgs, ... }:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-bitmapsong-pcf";
version = "1.0.0-RC1";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
#hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
};
buildInputs = [ pkgs.fontforge ];
buildPhase = ''
newName() {
test "''${1:5:1}" = i && _it=Italic || _it=
case ''${1:6:3} in
400) test -z $it && _weight=Medium ;;
700) _weight=Bold ;;
esac
_pt=''${1%.pcf}
_pt=''${_pt#*-}
echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
}
for i in *.pcf; do
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
done
'';
installPhase = ''
install -Dm644 *.otb -t $out/share/fonts/
'';
}
+19
View File
@@ -0,0 +1,19 @@
{ lib, config, pkgs, ... }:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-microhei";
version = "0.2.0-beta";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttc -t $out/share/fonts/
runHook postInstall
'';
}
+19
View File
@@ -0,0 +1,19 @@
{ lib, config, pkgs, ... }:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-zenhei";
version = "0.9.45";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttc -t $out/share/fonts/
runHook postInstall
'';
}