mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 11:13:30 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
51 lines
1.5 KiB
Nix
51 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch, inkscape, imagemagick, potrace, svgo, scfbuild }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "emojione";
|
|
version = "1.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "eosrei";
|
|
repo = "emojione-color-font";
|
|
rev = "v${version}";
|
|
sha256 = "1781kxfbhnvylypbkwxc3mx6hi0gcjisfjr9cf0jdz4d1zkf09b3";
|
|
};
|
|
|
|
patches = [
|
|
# Fix build with Inkscape 1.0
|
|
# https://github.com/eosrei/twemoji-color-font/pull/82
|
|
(fetchpatch {
|
|
url = "https://github.com/eosrei/twemoji-color-font/commit/208ad63c2ceb38c528b5237abeb2b85ceedc1d37.patch";
|
|
sha256 = "7tDWIkpcdir1V6skgXSM3r0FwHy0F6PyJ07OPRsSStA=";
|
|
postFetch = ''
|
|
substituteInPlace $out \
|
|
--replace "inkscape --without-gui" "inkscape --export-png" \
|
|
--replace TWEMOJI EMOJIONE \
|
|
--replace "the assets" "the emojione assets" \
|
|
--replace twemoji emojione
|
|
'';
|
|
})
|
|
];
|
|
|
|
preBuild = ''
|
|
sed -i 's,SCFBUILD :=.*,SCFBUILD := scfbuild,' Makefile
|
|
# Shut up inkscape's warnings
|
|
export HOME="$NIX_BUILD_ROOT"
|
|
'';
|
|
|
|
nativeBuildInputs = [ inkscape imagemagick potrace svgo scfbuild ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
installPhase = ''
|
|
install -Dm755 build/EmojiOneColor-SVGinOT.ttf $out/share/fonts/truetype/EmojiOneColor-SVGinOT.ttf
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open source emoji set";
|
|
homepage = "http://emojione.com/";
|
|
license = licenses.cc-by-40;
|
|
maintainers = with maintainers; [ abbradar ];
|
|
};
|
|
}
|