openmoji-black,openmoji-color: 12.1.0 -> 12.4.0

This commit is contained in:
Francesco Gazzetta 2020-07-06 12:21:48 +02:00
parent 5a75f05863
commit 33f73db2e5

View file

@ -1,6 +1,7 @@
{ stdenv
, fetchFromGitHub
, scfbuild
, python3Packages
, variant ? "color" # "color" or "black"
}:
@ -9,20 +10,33 @@ let
[ "color" "black" ]
[ "OpenMoji-Color.ttf" "OpenMoji-Black.ttf" ]
variant;
scfbuildOptions = stdenv.lib.optionalString (variant == "black") "--glyph-only";
# We have to use their scfbuild fork:
# https://github.com/hfg-gmuend/openmoji/tree/master/font#setup
scfbuildPatched = scfbuild.overrideAttrs (old: {
src = fetchFromGitHub {
owner = "b-g";
repo = "scfbuild";
rev = "880f690332fc9cc4dee0790921d331f13bd5acaa";
sha256 = "0d61gn69hgxn17jvs69xpblq9z1l85aymbrn6jjwqamhpcl42c04";
};
propagatedBuildInputs = old.propagatedBuildInputs ++ [ python3Packages.lxml ];
});
in stdenv.mkDerivation rec {
pname = "openmoji";
version = "12.1.0";
version = "12.4.0";
src = fetchFromGitHub {
owner = "hfg-gmuend";
repo = pname;
rev = version;
sha256 = "11221xw13lsv2znxs295m61cn69wkp5934b0aaddpki2vp6q3n0r";
sha256 = "0zis0i7fn7dqv39c9ms7f1p4dqqzwdfwkdgrijaak1cmb8rkn3a0";
};
nativeBuildInputs = [
scfbuild
scfbuildPatched
];
# Some id and data-* attributes in the svg files contain unicode characters,
@ -60,7 +74,7 @@ in stdenv.mkDerivation rec {
# Actually build the font:
cd font
scfbuild -c scfbuild-${variant}.yml
scfbuild ${scfbuildOptions} -c scfbuild-${variant}.yml
'';
installPhase = ''