mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
xorg: remove with statements in overrides
This commit is contained in:
parent
463a5e7c03
commit
2cc74f92a0
@ -365,13 +365,13 @@ self: super:
|
|||||||
|
|
||||||
libXres = super.libXres.overrideAttrs (attrs: {
|
libXres = super.libXres.overrideAttrs (attrs: {
|
||||||
outputs = [ "out" "dev" "devdoc" ];
|
outputs = [ "out" "dev" "devdoc" ];
|
||||||
buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ];
|
buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ];
|
||||||
configureFlags = attrs.configureFlags or []
|
configureFlags = attrs.configureFlags or []
|
||||||
++ malloc0ReturnsNullCrossFlag;
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
});
|
});
|
||||||
|
|
||||||
libXScrnSaver = super.libXScrnSaver.overrideAttrs (attrs: {
|
libXScrnSaver = super.libXScrnSaver.overrideAttrs (attrs: {
|
||||||
buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ];
|
buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ];
|
||||||
configureFlags = attrs.configureFlags or []
|
configureFlags = attrs.configureFlags or []
|
||||||
++ malloc0ReturnsNullCrossFlag;
|
++ malloc0ReturnsNullCrossFlag;
|
||||||
});
|
});
|
||||||
@ -401,7 +401,7 @@ self: super:
|
|||||||
});
|
});
|
||||||
|
|
||||||
libXpresent = super.libXpresent.overrideAttrs (attrs: {
|
libXpresent = super.libXpresent.overrideAttrs (attrs: {
|
||||||
buildInputs = with xorg; attrs.buildInputs ++ [ libXext libXfixes libXrandr ];
|
buildInputs = attrs.buildInputs ++ [ xorg.libXext xorg.libXfixes xorg.libXrandr ];
|
||||||
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes ];
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes ];
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -417,7 +417,7 @@ self: super:
|
|||||||
nativeBuildInputs = attrs.nativeBuildInputs ++ [ meson ninja ];
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ meson ninja ];
|
||||||
|
|
||||||
buildInputs = attrs.buildInputs ++ [ zlib ]
|
buildInputs = attrs.buildInputs ++ [ zlib ]
|
||||||
++ lib.optionals stdenv.hostPlatform.isNetBSD (with netbsd; [ libarch libpci ]);
|
++ lib.optionals stdenv.hostPlatform.isNetBSD [ netbsd.libarch netbsd.libpci ];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
(lib.mesonOption "pci-ids" "${hwdata}/share/hwdata")
|
(lib.mesonOption "pci-ids" "${hwdata}/share/hwdata")
|
||||||
@ -668,15 +668,13 @@ self: super:
|
|||||||
xkeyboardconfig_custom = { layouts ? { } }:
|
xkeyboardconfig_custom = { layouts ? { } }:
|
||||||
let
|
let
|
||||||
patchIn = name: layout:
|
patchIn = name: layout:
|
||||||
with layout;
|
|
||||||
with lib;
|
|
||||||
''
|
''
|
||||||
# install layout files
|
# install layout files
|
||||||
${optionalString (compatFile != null) "cp '${compatFile}' 'compat/${name}'"}
|
${lib.optionalString (layout.compatFile != null) "cp '${layout.compatFile}' 'compat/${name}'"}
|
||||||
${optionalString (geometryFile != null) "cp '${geometryFile}' 'geometry/${name}'"}
|
${lib.optionalString (layout.geometryFile != null) "cp '${layout.geometryFile}' 'geometry/${name}'"}
|
||||||
${optionalString (keycodesFile != null) "cp '${keycodesFile}' 'keycodes/${name}'"}
|
${lib.optionalString (layout.keycodesFile != null) "cp '${layout.keycodesFile}' 'keycodes/${name}'"}
|
||||||
${optionalString (symbolsFile != null) "cp '${symbolsFile}' 'symbols/${name}'"}
|
${lib.optionalString (layout.symbolsFile != null) "cp '${layout.symbolsFile}' 'symbols/${name}'"}
|
||||||
${optionalString (typesFile != null) "cp '${typesFile}' 'types/${name}'"}
|
${lib.optionalString (layout.typesFile != null) "cp '${layout.typesFile}' 'types/${name}'"}
|
||||||
|
|
||||||
# add model description
|
# add model description
|
||||||
${ed}/bin/ed -v rules/base.xml <<EOF
|
${ed}/bin/ed -v rules/base.xml <<EOF
|
||||||
@ -705,7 +703,7 @@ self: super:
|
|||||||
<shortDescription>${name}</shortDescription>
|
<shortDescription>${name}</shortDescription>
|
||||||
<description>${layout.description}</description>
|
<description>${layout.description}</description>
|
||||||
<languageList>
|
<languageList>
|
||||||
${concatMapStrings (lang: "<iso639Id>${lang}</iso639Id>\n") layout.languages}
|
${lib.concatMapStrings (lang: "<iso639Id>${lang}</iso639Id>\n") layout.languages}
|
||||||
</languageList>
|
</languageList>
|
||||||
</configItem>
|
</configItem>
|
||||||
<variantList/>
|
<variantList/>
|
||||||
@ -717,7 +715,7 @@ self: super:
|
|||||||
in
|
in
|
||||||
xorg.xkeyboardconfig.overrideAttrs (old: {
|
xorg.xkeyboardconfig.overrideAttrs (old: {
|
||||||
buildInputs = old.buildInputs ++ [ automake ];
|
buildInputs = old.buildInputs ++ [ automake ];
|
||||||
postPatch = with lib; concatStrings (mapAttrsToList patchIn layouts);
|
postPatch = lib.concatStrings (lib.mapAttrsToList patchIn layouts);
|
||||||
});
|
});
|
||||||
|
|
||||||
xlsfonts = super.xlsfonts.overrideAttrs (attrs: {
|
xlsfonts = super.xlsfonts.overrideAttrs (attrs: {
|
||||||
@ -743,7 +741,7 @@ self: super:
|
|||||||
meta = attrs.meta // { platforms = lib.platforms.unix ++ lib.platforms.windows; };
|
meta = attrs.meta // { platforms = lib.platforms.unix ++ lib.platforms.windows; };
|
||||||
});
|
});
|
||||||
|
|
||||||
xorgserver = with xorg; super.xorgserver.overrideAttrs (attrs_passed:
|
xorgserver = super.xorgserver.overrideAttrs (attrs_passed:
|
||||||
let
|
let
|
||||||
attrs = attrs_passed // {
|
attrs = attrs_passed // {
|
||||||
buildInputs = attrs_passed.buildInputs ++
|
buildInputs = attrs_passed.buildInputs ++
|
||||||
@ -759,14 +757,14 @@ self: super:
|
|||||||
in attrs //
|
in attrs //
|
||||||
(let
|
(let
|
||||||
version = lib.getVersion attrs;
|
version = lib.getVersion attrs;
|
||||||
commonBuildInputs = attrs.buildInputs ++ [ xtrans libxcvt ];
|
commonBuildInputs = attrs.buildInputs ++ [ xorg.xtrans xorg.libxcvt ];
|
||||||
commonPropagatedBuildInputs = [
|
commonPropagatedBuildInputs = [
|
||||||
dbus libGL libGLU libXext libXfont libXfont2 libepoxy libunwind
|
dbus libGL libGLU xorg.libXext xorg.libXfont xorg.libXfont2 libepoxy libunwind
|
||||||
libxshmfence pixman xorgproto zlib
|
xorg.libxshmfence xorg.pixman xorg.xorgproto zlib
|
||||||
];
|
];
|
||||||
# XQuartz requires two compilations: the first to get X / XQuartz,
|
# XQuartz requires two compilations: the first to get X / XQuartz,
|
||||||
# and the second to get Xvfb, Xnest, etc.
|
# and the second to get Xvfb, Xnest, etc.
|
||||||
darwinOtherX = xorgserver.overrideAttrs (oldAttrs: {
|
darwinOtherX = xorg.xorgserver.overrideAttrs (oldAttrs: {
|
||||||
configureFlags = oldAttrs.configureFlags ++ [
|
configureFlags = oldAttrs.configureFlags ++ [
|
||||||
"--disable-xquartz"
|
"--disable-xquartz"
|
||||||
"--enable-xorg"
|
"--enable-xorg"
|
||||||
@ -796,7 +794,7 @@ self: super:
|
|||||||
./dont-create-logdir-during-build.patch
|
./dont-create-logdir-during-build.patch
|
||||||
];
|
];
|
||||||
buildInputs = commonBuildInputs ++ [ libdrm mesa ];
|
buildInputs = commonBuildInputs ++ [ libdrm mesa ];
|
||||||
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ libpciaccess ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libpciaccess ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
|
||||||
udev
|
udev
|
||||||
];
|
];
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
@ -844,7 +842,7 @@ self: super:
|
|||||||
mesa
|
mesa
|
||||||
];
|
];
|
||||||
propagatedBuildInputs = commonPropagatedBuildInputs ++ [
|
propagatedBuildInputs = commonPropagatedBuildInputs ++ [
|
||||||
libAppleWM xorgproto
|
xorg.libAppleWM xorg.xorgproto
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -932,12 +930,12 @@ self: super:
|
|||||||
"--without-dtrace"
|
"--without-dtrace"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = old.buildInputs ++ (with xorg; [
|
buildInputs = old.buildInputs ++ [
|
||||||
pixman
|
xorg.pixman
|
||||||
libXfont2
|
xorg.libXfont2
|
||||||
xtrans
|
xorg.xtrans
|
||||||
libxcvt
|
xorg.libxcvt
|
||||||
]) ++ lib.optional stdenv.isDarwin [ Xplugin ];
|
] ++ lib.optional stdenv.isDarwin [ Xplugin ];
|
||||||
});
|
});
|
||||||
|
|
||||||
lndir = super.lndir.overrideAttrs (attrs: {
|
lndir = super.lndir.overrideAttrs (attrs: {
|
||||||
@ -1182,8 +1180,7 @@ self: super:
|
|||||||
super.${name}.overrideAttrs (attrs: {
|
super.${name}.overrideAttrs (attrs: {
|
||||||
meta = attrs.meta // { inherit license; };
|
meta = attrs.meta // { inherit license; };
|
||||||
});
|
});
|
||||||
mapNamesToAttrs = f: names: with lib;
|
mapNamesToAttrs = f: names: lib.listToAttrs (lib.zipListsWith lib.nameValuePair names (map f names));
|
||||||
listToAttrs (zipListsWith nameValuePair names (map f names));
|
|
||||||
|
|
||||||
in
|
in
|
||||||
mapNamesToAttrs (setLicense lib.licenses.unfreeRedistributable) redist //
|
mapNamesToAttrs (setLicense lib.licenses.unfreeRedistributable) redist //
|
||||||
|
Loading…
Reference in New Issue
Block a user