diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2022-12-29 01:36:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-29 01:36:12 +0100 |
commit | 6c056bed3a723631798153c516b0d4a176396b2e (patch) | |
tree | ea90459e44958f9e5f4b93f5d5f328d02800437b /pkgs/development/libraries | |
parent | 7bc51003411d4aebc8b543b2f84da6a0eefa3789 (diff) | |
parent | 5e3e81f6048239c821e7663a2371d4cd018b1ef1 (diff) |
Merge pull request #205046 from SuperSandro2000/lib-meson
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/fcft/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/harfbuzz/default.nix | 29 |
2 files changed, 12 insertions, 23 deletions
diff --git a/pkgs/development/libraries/fcft/default.nix b/pkgs/development/libraries/fcft/default.nix index 5090df411c2f8..453bac74b2c25 100644 --- a/pkgs/development/libraries/fcft/default.nix +++ b/pkgs/development/libraries/fcft/default.nix @@ -13,10 +13,6 @@ let "grapheme" "run" ]; - - # Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54 - mesonFeatureFlag = feature: flag: - "-D${feature}=${if flag then "enabled" else "disabled"}"; in stdenv.mkDerivation rec { @@ -40,7 +36,7 @@ stdenv.mkDerivation rec { mesonBuildType = "release"; mesonFlags = builtins.map (t: - mesonFeatureFlag "${t}-shaping" (lib.elem t withShapingTypes) + lib.mesonEnable "${t}-shaping" (lib.elem t withShapingTypes) ) availableShapingTypes; doCheck = true; diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix index 797b3243ab9a0..977d39ba35687 100644 --- a/pkgs/development/libraries/harfbuzz/default.nix +++ b/pkgs/development/libraries/harfbuzz/default.nix @@ -30,16 +30,9 @@ , qt5 }: -let +stdenv.mkDerivation rec { + pname = "harfbuzz${lib.optionalString withIcu "-icu"}"; version = "5.3.1"; - inherit (lib) optional optionals optionalString; - mesonFeatureFlag = feature: flag: - "-D${feature}=${if flag then "enabled" else "disabled"}"; -in - -stdenv.mkDerivation { - pname = "harfbuzz${optionalString withIcu "-icu"}"; - inherit version; src = fetchurl { url = "https://github.com/harfbuzz/harfbuzz/releases/download/${version}/harfbuzz-${version}.tar.xz"; @@ -72,12 +65,12 @@ stdenv.mkDerivation { # and is not part of the library. # Cairo causes transitive (build) dependencies on various X11 or other # GUI-related libraries, so it shouldn't be re-added lightly. - (mesonFeatureFlag "cairo" false) + (lib.mesonEnable "cairo" false) # chafa is only used in a development utility, not in the library - (mesonFeatureFlag "chafa" false) - (mesonFeatureFlag "coretext" withCoreText) - (mesonFeatureFlag "graphite" withGraphite2) - (mesonFeatureFlag "icu" withIcu) + (lib.mesonEnable "chafa" false) + (lib.mesonEnable "coretext" withCoreText) + (lib.mesonEnable "graphite" withGraphite2) + (lib.mesonEnable "icu" withIcu) ]; depsBuildBuild = [ @@ -99,17 +92,17 @@ stdenv.mkDerivation { buildInputs = [ glib freetype gobject-introspection ] ++ lib.optionals withCoreText [ ApplicationServices CoreText ]; - propagatedBuildInputs = optional withGraphite2 graphite2 - ++ optionals withIcu [ icu harfbuzz ]; + propagatedBuildInputs = lib.optional withGraphite2 graphite2 + ++ lib.optionals withIcu [ icu harfbuzz ]; doCheck = true; # Slightly hacky; some pkgs expect them in a single directory. - postFixup = optionalString withIcu '' + postFixup = lib.optionalString withIcu '' rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc" ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.la ln -s {'${harfbuzz.dev}',"$dev"}/lib/pkgconfig/harfbuzz.pc - ${optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.isDarwin '' ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.dylib ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.0.dylib ''} |