2020-12-03 09:49:04 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2019-10-01 13:43:42 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, scfbuild
|
2021-08-12 15:14:19 +00:00
|
|
|
, nodejs
|
|
|
|
, nodePackages
|
2020-07-06 10:21:48 +00:00
|
|
|
, python3Packages
|
2019-10-01 13:43:42 +00:00
|
|
|
, variant ? "color" # "color" or "black"
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
filename = builtins.replaceStrings
|
|
|
|
[ "color" "black" ]
|
|
|
|
[ "OpenMoji-Color.ttf" "OpenMoji-Black.ttf" ]
|
|
|
|
variant;
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "openmoji";
|
2020-12-03 09:49:04 +00:00
|
|
|
version = "13.1.0";
|
2019-10-01 13:43:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hfg-gmuend";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-12-03 09:49:04 +00:00
|
|
|
sha256 = "sha256-7G6a+LFq79njyPhnDhhSJ98Smw5fWlfcsFj6nWBPsSk=";
|
2019-10-01 13:43:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-09-16 09:24:54 +00:00
|
|
|
scfbuild
|
2021-08-12 15:14:19 +00:00
|
|
|
nodejs
|
|
|
|
nodePackages.glob
|
|
|
|
nodePackages.lodash
|
2019-10-01 13:43:42 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2021-08-12 15:14:19 +00:00
|
|
|
runHook preBuild
|
2019-10-01 13:43:42 +00:00
|
|
|
|
2021-08-12 15:14:19 +00:00
|
|
|
node helpers/generate-font-glyphs.js
|
2019-10-01 13:43:42 +00:00
|
|
|
|
|
|
|
cd font
|
2020-09-16 09:24:54 +00:00
|
|
|
scfbuild -c scfbuild-${variant}.yml
|
2021-08-12 15:14:19 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
2019-10-01 13:43:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm644 ${filename} $out/share/fonts/truetype/${filename}
|
|
|
|
'';
|
|
|
|
|
2020-12-03 09:49:04 +00:00
|
|
|
meta = with lib; {
|
2019-10-01 13:43:42 +00:00
|
|
|
license = licenses.cc-by-sa-40;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
homepage = "https://openmoji.org/";
|
|
|
|
downloadPage = "https://github.com/hfg-gmuend/openmoji/releases";
|
|
|
|
description = "Open-source emojis for designers, developers and everyone else";
|
|
|
|
};
|
|
|
|
}
|