From e475409170ca2d7deb5935caf22da6d5cc90c451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 8 Aug 2021 19:14:05 +0200 Subject: [PATCH 1/2] freetype: format --- .../libraries/freetype/default.nix | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 943a25dcf646e..29db18e34e09b 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -9,28 +9,11 @@ useEncumberedCode ? true }: -let - inherit (lib) optional optionalString; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "freetype"; version = "2.11.0"; - meta = with lib; { - description = "A font rendering engine"; - longDescription = '' - FreeType is a portable and efficient library for rendering fonts. It - supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR - fonts. It has a bytecode interpreter and has an automatic hinter called - autofit which can be used instead of hinting instructions included in - fonts. - ''; - homepage = "https://www.freetype.org/"; - license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause) - platforms = platforms.all; - maintainers = with maintainers; [ ttuegel ]; - }; - src = fetchurl { url = "mirror://savannah/${pname}/${pname}-${version}.tar.xz"; sha256 = "sha256-i+45vTloxIBLcGFKCjrVlyma0OgkvIqtXOiq9IBnvec="; @@ -41,12 +24,11 @@ in stdenv.mkDerivation rec { # dependence on harfbuzz is looser than the reverse dependence nativeBuildInputs = [ pkg-config which makeWrapper ] # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. - ++ optional (!stdenv.isLinux) gnumake; + ++ lib.optional (!stdenv.isLinux) gnumake; - patches = - [ ./enable-table-validation.patch - ] ++ - optional useEncumberedCode ./enable-subpixel-rendering.patch; + patches = [ + ./enable-table-validation.patch + ] ++ lib.optional useEncumberedCode ./enable-subpixel-rendering.patch; outputs = [ "out" "dev" ]; @@ -56,7 +38,7 @@ in stdenv.mkDerivation rec { CC_BUILD = "${buildPackages.stdenv.cc}/bin/cc"; # The asm for armel is written with the 'asm' keyword. - CFLAGS = optionalString stdenv.isAarch32 "-std=gnu99"; + CFLAGS = lib.optionalString stdenv.isAarch32 "-std=gnu99"; enableParallelBuilding = true; @@ -70,4 +52,19 @@ in stdenv.mkDerivation rec { --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig" ''; + meta = with lib; { + description = "A font rendering engine"; + longDescription = '' + FreeType is a portable and efficient library for rendering fonts. It + supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR + fonts. It has a bytecode interpreter and has an automatic hinter called + autofit which can be used instead of hinting instructions included in + fonts. + ''; + homepage = "https://www.freetype.org/"; + license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause) + platforms = platforms.all; + maintainers = with maintainers; [ ttuegel ]; + }; + } From bd59b72a3b564af85a6e1bb6819584694904d5da Mon Sep 17 00:00:00 2001 From: Sandro Date: Sun, 8 Aug 2021 20:34:27 +0200 Subject: [PATCH 2/2] Update pkgs/development/libraries/freetype/default.nix --- pkgs/development/libraries/freetype/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 29db18e34e09b..6c66561f29f2f 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -66,5 +66,4 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ ttuegel ]; }; - }