pkgs/tools: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-15 17:12:36 +07:00
parent 94f3683935
commit 8c5d37129f
916 changed files with 2510 additions and 2510 deletions
+5 -5
View File
@@ -7,7 +7,7 @@
assert stdenv.isDarwin -> ApplicationServices != null;
let
inherit (stdenv.lib) optional optionals optionalString;
inherit (lib) optional optionals optionalString;
raw_patch =
# https://gitlab.com/graphviz/graphviz/issues/1367 CVE-2018-10196
fetchpatch {
@@ -17,13 +17,13 @@ let
excludes = ["tests/*"]; # we don't run them and they don't apply
};
# the patch needs a small adaption for older versions
patchToUse = if stdenv.lib.versionAtLeast version "2.37" then raw_patch else
patchToUse = if lib.versionAtLeast version "2.37" then raw_patch else
stdenv.mkDerivation {
inherit (raw_patch) name;
buildCommand = "sed s/dot_root/agroot/g ${raw_patch} > $out";
};
# 2.42 has the patch included
patches = optional (stdenv.lib.versionOlder version "2.42") patchToUse;
patches = optional (lib.versionOlder version "2.42") patchToUse;
in
stdenv.mkDerivation {
@@ -46,13 +46,13 @@ stdenv.mkDerivation {
hardeningDisable = [ "fortify" ];
CPPFLAGS = stdenv.lib.optionalString (xorg != null && stdenv.isDarwin)
CPPFLAGS = lib.optionalString (xorg != null && stdenv.isDarwin)
"-I${cairo.dev}/include/cairo";
configureFlags = [
"--with-ltdl-lib=${libtool.lib}/lib"
"--with-ltdl-include=${libtool}/include"
] ++ stdenv.lib.optional (xorg == null) "--without-x";
] ++ lib.optional (xorg == null) "--without-x";
inherit patches;