pkgs/servers: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-15 14:24:03 +07:00
parent e245ae3c3a
commit 872973d7d1
172 changed files with 454 additions and 455 deletions
+15 -15
View File
@@ -12,7 +12,7 @@ let
inherit (stdenv) lib isDarwin;
inherit (lib) overrideDerivation;
malloc0ReturnsNullCrossFlag = stdenv.lib.optional
malloc0ReturnsNullCrossFlag = lib.optional
(stdenv.hostPlatform != stdenv.buildPlatform)
"--enable-malloc0returnsnull";
in
@@ -75,7 +75,7 @@ self: super:
libxcb = super.libxcb.overrideAttrs (attrs: {
configureFlags = [ "--enable-xkb" "--enable-xinput" ]
++ stdenv.lib.optional stdenv.hostPlatform.isStatic "--disable-shared";
++ lib.optional stdenv.hostPlatform.isStatic "--disable-shared";
outputs = [ "out" "dev" "man" "doc" ];
});
@@ -85,7 +85,7 @@ self: super:
++ malloc0ReturnsNullCrossFlag;
depsBuildBuild = [
buildPackages.stdenv.cc
] ++ stdenv.lib.optionals stdenv.hostPlatform.isStatic [
] ++ lib.optionals stdenv.hostPlatform.isStatic [
(self.buildPackages.stdenv.cc.libc.static or null)
];
preConfigure = ''
@@ -95,7 +95,7 @@ self: super:
# Remove useless DocBook XML files.
rm -rf $out/share/doc
'';
CPP = stdenv.lib.optionalString stdenv.isDarwin "clang -E -";
CPP = lib.optionalString stdenv.isDarwin "clang -E -";
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto ];
});
@@ -144,7 +144,7 @@ self: super:
++ malloc0ReturnsNullCrossFlag;
preConfigure = attrs.preConfigure or ""
# missing transitive dependencies
+ stdenv.lib.optionalString stdenv.hostPlatform.isStatic ''
+ lib.optionalString stdenv.hostPlatform.isStatic ''
export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -lXau -lXdmcp"
'';
});
@@ -232,9 +232,9 @@ self: super:
libXi = super.libXi.overrideAttrs (attrs: {
outputs = [ "out" "dev" "man" "doc" ];
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXfixes ];
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"xorg_cv_malloc0_returns_null=no"
] ++ stdenv.lib.optional stdenv.hostPlatform.isStatic "--disable-shared";
] ++ lib.optional stdenv.hostPlatform.isStatic "--disable-shared";
});
libXinerama = super.libXinerama.overrideAttrs (attrs: {
@@ -320,7 +320,7 @@ self: super:
});
libpciaccess = super.libpciaccess.overrideAttrs (attrs: {
meta = attrs.meta // { platforms = stdenv.lib.platforms.linux; };
meta = attrs.meta // { platforms = lib.platforms.linux; };
});
setxkbmap = super.setxkbmap.overrideAttrs (attrs: {
@@ -346,7 +346,7 @@ self: super:
xcbutilcursor = super.xcbutilcursor.overrideAttrs (attrs: {
outputs = [ "out" "dev" ];
meta = attrs.meta // { maintainers = [ stdenv.lib.maintainers.lovek323 ]; };
meta = attrs.meta // { maintainers = [ lib.maintainers.lovek323 ]; };
});
xcbutilimage = super.xcbutilimage.overrideAttrs (attrs: {
@@ -596,7 +596,7 @@ self: super:
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ xorgproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
meta.platforms = stdenv.lib.platforms.unix;
meta.platforms = lib.platforms.unix;
} else if (abiCompat == "1.18") then {
name = "xorg-server-1.18.4";
builder = ./builder.sh;
@@ -606,8 +606,8 @@ self: super:
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ xorgproto libdrm openssl libX11 libXau libXaw libxcb xcbutil xcbutilwm xcbutilimage xcbutilkeysyms xcbutilrenderutil libXdmcp libXfixes libxkbfile libXmu libXpm libXrender libXres libXt ];
postPatch = stdenv.lib.optionalString stdenv.isLinux "sed '1i#include <malloc.h>' -i include/os.h";
meta.platforms = stdenv.lib.platforms.unix;
postPatch = lib.optionalString stdenv.isLinux "sed '1i#include <malloc.h>' -i include/os.h";
meta.platforms = lib.platforms.unix;
} else throw "unsupported xorg abiCompat ${abiCompat} for ${attrs_passed.name}";
in attrs //
@@ -646,7 +646,7 @@ self: super:
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ libpciaccess epoxy ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
udev
];
prePatch = stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
prePatch = lib.optionalString stdenv.hostPlatform.isMusl ''
export CFLAGS+=" -D__uid_t=uid_t -D__gid_t=gid_t"
'';
configureFlags = [
@@ -757,7 +757,7 @@ self: super:
doCheck = false; # fails
preConfigure = attrs.preConfigure or ""
# missing transitive dependencies
+ stdenv.lib.optionalString stdenv.hostPlatform.isStatic ''
+ lib.optionalString stdenv.hostPlatform.isStatic ''
export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -lxcb -lXau -lXdmcp"
'';
});
@@ -821,7 +821,7 @@ self: super:
});
xorgcffiles = super.xorgcffiles.overrideAttrs (attrs: {
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
postInstall = lib.optionalString stdenv.isDarwin ''
substituteInPlace $out/lib/X11/config/darwin.cf --replace "/usr/bin/" ""
'';
});
+2 -2
View File
@@ -1,8 +1,8 @@
{ stdenv, wayland, wayland-protocols, xorgserver, xkbcomp, xkeyboard_config
{ lib, stdenv, wayland, wayland-protocols, xorgserver, xkbcomp, xkeyboard_config
, epoxy, libxslt, libunwind, makeWrapper, egl-wayland
, defaultFontPath ? "" }:
with stdenv.lib;
with lib;
xorgserver.overrideAttrs (oldAttrs: {