pkgs/tools: stdenv.lib -> lib
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user