Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 66 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 inkscape, 7 imagemagick, 8 potrace, 9 svgo, 10 scfbuild, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "emojione"; 15 version = "1.4"; 16 17 src = fetchFromGitHub { 18 owner = "eosrei"; 19 repo = "emojione-color-font"; 20 rev = "v${version}"; 21 sha256 = "1781kxfbhnvylypbkwxc3mx6hi0gcjisfjr9cf0jdz4d1zkf09b3"; 22 }; 23 24 patches = [ 25 # Fix build with Inkscape 1.0 26 # https://github.com/eosrei/twemoji-color-font/pull/82 27 (fetchpatch { 28 url = "https://github.com/eosrei/twemoji-color-font/commit/208ad63c2ceb38c528b5237abeb2b85ceedc1d37.patch"; 29 sha256 = "7tDWIkpcdir1V6skgXSM3r0FwHy0F6PyJ07OPRsSStA="; 30 postFetch = '' 31 substituteInPlace $out \ 32 --replace "inkscape --without-gui" "inkscape --export-png" \ 33 --replace TWEMOJI EMOJIONE \ 34 --replace "the assets" "the emojione assets" \ 35 --replace twemoji emojione 36 ''; 37 }) 38 ]; 39 40 preBuild = '' 41 sed -i 's,SCFBUILD :=.*,SCFBUILD := scfbuild,' Makefile 42 # Shut up inkscape's warnings 43 export HOME="$NIX_BUILD_ROOT" 44 ''; 45 46 nativeBuildInputs = [ 47 inkscape 48 imagemagick 49 potrace 50 svgo 51 scfbuild 52 ]; 53 54 enableParallelBuilding = true; 55 56 installPhase = '' 57 install -Dm755 build/EmojiOneColor-SVGinOT.ttf $out/share/fonts/truetype/EmojiOneColor-SVGinOT.ttf 58 ''; 59 60 meta = with lib; { 61 description = "Open source emoji set"; 62 homepage = "http://emojione.com/"; 63 license = licenses.cc-by-40; 64 maintainers = with maintainers; [ abbradar ]; 65 }; 66}