xorg: use top-level xorg instead of self in overrides.nix

the packages will be spliced correctly

Artturin 7e00495e d6a9e826

+42 -41
+42 -41
pkgs/servers/x11/xorg/overrides.nix
··· 5 5 libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, 6 6 mesa, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook, 7 7 mcpp, libepoxy, openssl, pkg-config, llvm, libxslt, libxcrypt, 8 - ApplicationServices, Carbon, Cocoa, Xplugin 8 + ApplicationServices, Carbon, Cocoa, Xplugin, 9 + xorg 9 10 }: 10 11 11 12 let ··· 23 24 self: super: 24 25 { 25 26 bdftopcf = super.bdftopcf.overrideAttrs (attrs: { 26 - buildInputs = attrs.buildInputs ++ [ self.xorgproto ]; 27 + buildInputs = attrs.buildInputs ++ [ xorg.xorgproto ]; 27 28 }); 28 29 29 30 bitmap = super.bitmap.overrideAttrs (attrs: { ··· 32 33 paths=( 33 34 "$out/share/X11/%T/%N" 34 35 "$out/include/X11/%T/%N" 35 - "${self.xbitmaps}/include/X11/%T/%N" 36 + "${xorg.xbitmaps}/include/X11/%T/%N" 36 37 ) 37 38 wrapProgram "$out/bin/bitmap" \ 38 39 --suffix XFILESEARCHPATH : $(IFS=:; echo "''${paths[*]}") ··· 48 49 fontmiscmisc = super.fontmiscmisc.overrideAttrs (attrs: { 49 50 postInstall = 50 51 '' 51 - ALIASFILE=${self.fontalias}/share/fonts/X11/misc/fonts.alias 52 + ALIASFILE=${xorg.fontalias}/share/fonts/X11/misc/fonts.alias 52 53 test -f $ALIASFILE 53 54 cp $ALIASFILE $out/lib/X11/fonts/misc/fonts.alias 54 55 ''; ··· 59 60 }); 60 61 61 62 imake = super.imake.overrideAttrs (attrs: { 62 - inherit (self) xorgcffiles; 63 + inherit (xorg) xorgcffiles; 63 64 x11BuildHook = ./imake.sh; 64 65 patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch]; 65 66 setupHook = ./imake-setup-hook.sh; ··· 70 71 inherit tradcpp; 71 72 }); 72 73 73 - mkfontdir = self.mkfontscale; 74 + mkfontdir = xorg.mkfontscale; 74 75 75 76 libxcb = super.libxcb.overrideAttrs (attrs: { 76 77 configureFlags = [ "--enable-xkb" "--enable-xinput" ] ··· 85 86 depsBuildBuild = [ 86 87 buildPackages.stdenv.cc 87 88 ] ++ lib.optionals stdenv.hostPlatform.isStatic [ 88 - (self.buildPackages.stdenv.cc.libc.static or null) 89 + (xorg.buildPackages.stdenv.cc.libc.static or null) 89 90 ]; 90 91 preConfigure = '' 91 92 sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure ··· 95 96 rm -rf $out/share/doc 96 97 ''; 97 98 CPP = lib.optionalString stdenv.isDarwin "clang -E -"; 98 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto ]; 99 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ]; 99 100 }); 100 101 101 102 libAppleWM = super.libAppleWM.overrideAttrs (attrs: { ··· 107 108 108 109 libXau = super.libXau.overrideAttrs (attrs: { 109 110 outputs = [ "out" "dev" ]; 110 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto ]; 111 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ]; 111 112 }); 112 113 113 114 libXdmcp = super.libXdmcp.overrideAttrs (attrs: { ··· 161 162 ''; 162 163 configureFlags = attrs.configureFlags or [] 163 164 ++ malloc0ReturnsNullCrossFlag; 164 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libSM ]; 165 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libSM ]; 165 166 depsBuildBuild = [ buildPackages.stdenv.cc ]; 166 167 CPP = if stdenv.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -"; 167 168 outputs = [ "out" "dev" "devdoc" ]; ··· 181 182 182 183 libXcomposite = super.libXcomposite.overrideAttrs (attrs: { 183 184 outputs = [ "out" "dev" ]; 184 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXfixes ]; 185 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes ]; 185 186 }); 186 187 187 188 libXaw = super.libXaw.overrideAttrs (attrs: { 188 189 outputs = [ "out" "dev" "devdoc" ]; 189 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXmu ]; 190 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXmu ]; 190 191 }); 191 192 192 193 libXcursor = super.libXcursor.overrideAttrs (attrs: { ··· 199 200 200 201 libXft = super.libXft.overrideAttrs (attrs: { 201 202 outputs = [ "out" "dev" ]; 202 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXrender freetype fontconfig ]; 203 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXrender freetype fontconfig ]; 203 204 configureFlags = attrs.configureFlags or [] 204 205 ++ malloc0ReturnsNullCrossFlag; 205 206 ··· 214 215 215 216 libXext = super.libXext.overrideAttrs (attrs: { 216 217 outputs = [ "out" "dev" "man" "doc" ]; 217 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto self.libXau ]; 218 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto xorg.libXau ]; 218 219 configureFlags = attrs.configureFlags or [] 219 220 ++ malloc0ReturnsNullCrossFlag; 220 221 }); ··· 225 226 226 227 libXi = super.libXi.overrideAttrs (attrs: { 227 228 outputs = [ "out" "dev" "man" "doc" ]; 228 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXfixes self.libXext ]; 229 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes xorg.libXext ]; 229 230 configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ 230 231 "xorg_cv_malloc0_returns_null=no" 231 232 ] ++ lib.optional stdenv.hostPlatform.isStatic "--disable-shared"; ··· 246 247 outputs = [ "out" "dev" ]; 247 248 configureFlags = attrs.configureFlags or [] 248 249 ++ malloc0ReturnsNullCrossFlag; 249 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXrender ]; 250 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXrender ]; 250 251 }); 251 252 252 253 libSM = super.libSM.overrideAttrs (attrs: { 253 254 outputs = [ "out" "dev" "doc" ]; 254 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libICE ]; 255 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libICE ]; 255 256 }); 256 257 257 258 libXrender = super.libXrender.overrideAttrs (attrs: { 258 259 outputs = [ "out" "dev" "doc" ]; 259 260 configureFlags = attrs.configureFlags or [] 260 261 ++ malloc0ReturnsNullCrossFlag; 261 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto ]; 262 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ]; 262 263 }); 263 264 264 265 libXres = super.libXres.overrideAttrs (attrs: { 265 266 outputs = [ "out" "dev" "devdoc" ]; 266 - buildInputs = with self; attrs.buildInputs ++ [ utilmacros ]; 267 + buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ]; 267 268 configureFlags = attrs.configureFlags or [] 268 269 ++ malloc0ReturnsNullCrossFlag; 269 270 }); 270 271 271 272 libXScrnSaver = super.libXScrnSaver.overrideAttrs (attrs: { 272 - buildInputs = with self; attrs.buildInputs ++ [ utilmacros ]; 273 + buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ]; 273 274 configureFlags = attrs.configureFlags or [] 274 275 ++ malloc0ReturnsNullCrossFlag; 275 276 }); ··· 284 285 outputs = [ "out" "dev" "doc" ]; 285 286 configureFlags = attrs.configureFlags or [] 286 287 ++ malloc0ReturnsNullCrossFlag; 287 - buildInputs = attrs.buildInputs ++ [self.xorgproto]; 288 + buildInputs = attrs.buildInputs ++ [xorg.xorgproto]; 288 289 }); 289 290 290 291 libXp = super.libXp.overrideAttrs (attrs: { ··· 297 298 }); 298 299 299 300 libXpresent = super.libXpresent.overrideAttrs (attrs: { 300 - buildInputs = with self; attrs.buildInputs ++ [ libXext libXfixes libXrandr ]; 301 + buildInputs = with xorg; attrs.buildInputs ++ [ libXext libXfixes libXrandr ]; 301 302 }); 302 303 303 304 libxkbfile = super.libxkbfile.overrideAttrs (attrs: { ··· 321 322 postInstall = 322 323 '' 323 324 mkdir -p $out/share/man/man7 324 - ln -sfn ${self.xkeyboardconfig}/etc/X11 $out/share/X11 325 - ln -sfn ${self.xkeyboardconfig}/share/man/man7/xkeyboard-config.7.gz $out/share/man/man7 325 + ln -sfn ${xorg.xkeyboardconfig}/etc/X11 $out/share/X11 326 + ln -sfn ${xorg.xkeyboardconfig}/share/man/man7/xkeyboard-config.7.gz $out/share/man/man7 326 327 ''; 327 328 }); 328 329 ··· 444 445 445 446 xf86videoati = super.xf86videoati.overrideAttrs (attrs: { 446 447 nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ]; 447 - buildInputs = attrs.buildInputs ++ [ self.utilmacros ]; 448 + buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ]; 448 449 patches = [ 449 450 (fetchpatch { 450 451 url = "https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/commit/e0511968d04b42abf11bc0ffb387f143582bc144.patch"; ··· 455 456 456 457 xf86videonouveau = super.xf86videonouveau.overrideAttrs (attrs: { 457 458 nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ]; 458 - buildInputs = attrs.buildInputs ++ [ self.utilmacros ]; 459 + buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ]; 459 460 }); 460 461 461 462 xf86videoglint = super.xf86videoglint.overrideAttrs (attrs: { 462 463 nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ]; 463 - buildInputs = attrs.buildInputs ++ [ self.utilmacros ]; 464 + buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ]; 464 465 # https://gitlab.freedesktop.org/xorg/driver/xf86-video-glint/-/issues/1 465 466 meta = attrs.meta // { broken = true; }; 466 467 }); ··· 599 600 }); 600 601 601 602 xvinfo = super.xvinfo.overrideAttrs (attrs: { 602 - buildInputs = attrs.buildInputs ++ [self.libXext]; 603 + buildInputs = attrs.buildInputs ++ [xorg.libXext]; 603 604 }); 604 605 605 606 xkbcomp = super.xkbcomp.overrideAttrs (attrs: { 606 - configureFlags = [ "--with-xkb-config-root=${self.xkeyboardconfig}/share/X11/xkb" ]; 607 + configureFlags = [ "--with-xkb-config-root=${xorg.xkeyboardconfig}/share/X11/xkb" ]; 607 608 }); 608 609 609 610 xkeyboardconfig = super.xkeyboardconfig.overrideAttrs (attrs: { ··· 693 694 EOF 694 695 ''; 695 696 in 696 - self.xkeyboardconfig.overrideAttrs (old: { 697 + xorg.xkeyboardconfig.overrideAttrs (old: { 697 698 buildInputs = old.buildInputs ++ [ automake ]; 698 699 postPatch = with lib; concatStrings (mapAttrsToList patchIn layouts); 699 700 }); ··· 714 715 mesonFlags = [ "-Dlegacy=true" ]; 715 716 }); 716 717 717 - xorgserver = with self; super.xorgserver.overrideAttrs (attrs_passed: 718 + xorgserver = with xorg; super.xorgserver.overrideAttrs (attrs_passed: 718 719 # exchange attrs if abiCompat is set 719 720 let 720 721 version = lib.getVersion attrs_passed; ··· 821 822 "--enable-xcsecurity" # enable SECURITY extension 822 823 "--with-default-font-path=" # there were only paths containing "${prefix}", 823 824 # and there are no fonts in this package anyway 824 - "--with-xkb-bin-directory=${self.xkbcomp}/bin" 825 - "--with-xkb-path=${self.xkeyboardconfig}/share/X11/xkb" 825 + "--with-xkb-bin-directory=${xorg.xkbcomp}/bin" 826 + "--with-xkb-path=${xorg.xkeyboardconfig}/share/X11/xkb" 826 827 "--with-xkb-output=$out/share/X11/xkb/compiled" 827 828 "--with-log-dir=/var/log" 828 829 "--enable-glamor" ··· 842 843 ''; 843 844 passthru.version = version; # needed by virtualbox guest additions 844 845 } else { 845 - nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook self.utilmacros self.fontutil ]; 846 + nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook xorg.utilmacros xorg.fontutil ]; 846 847 buildInputs = commonBuildInputs ++ [ 847 848 bootstrap_cmds automake autoconf 848 849 Xplugin Carbon Cocoa ··· 930 931 }); 931 932 932 933 xcursorthemes = super.xcursorthemes.overrideAttrs (attrs: { 933 - nativeBuildInputs = attrs.nativeBuildInputs ++ [ self.xcursorgen ]; 934 - buildInputs = attrs.buildInputs ++ [ self.xorgproto ]; 934 + nativeBuildInputs = attrs.nativeBuildInputs ++ [ xorg.xcursorgen ]; 935 + buildInputs = attrs.buildInputs ++ [ xorg.xorgproto ]; 935 936 configureFlags = [ "--with-cursordir=$(out)/share/icons" ]; 936 937 }); 937 938 ··· 941 942 buildInputs = attrs.buildInputs ++ lib.optional isDarwin bootstrap_cmds; 942 943 depsBuildBuild = [ buildPackages.stdenv.cc ]; 943 944 configureFlags = [ 944 - "--with-xserver=${self.xorgserver.out}/bin/X" 945 + "--with-xserver=${xorg.xorgserver.out}/bin/X" 945 946 ] ++ lib.optionals isDarwin [ 946 947 "--with-bundle-id-prefix=org.nixos.xquartz" 947 948 "--with-launchdaemons-dir=\${out}/LaunchDaemons" ··· 959 960 # Avoid replacement of word-looking cpp's builtin macros in Nix's cross-compiled paths 960 961 substituteInPlace Makefile.in --replace "PROGCPPDEFS =" "PROGCPPDEFS = -Dlinux=linux -Dunix=unix" 961 962 ''; 962 - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xauth ] 963 - ++ lib.optionals isDarwin [ self.libX11 self.xorgproto ]; 963 + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xauth ] 964 + ++ lib.optionals isDarwin [ xorg.libX11 xorg.xorgproto ]; 964 965 postFixup = '' 965 966 substituteInPlace $out/bin/startx --replace $out/etc/X11/xinit/xserverrc /etc/X11/xinit/xserverrc 966 967 ''; ··· 977 978 rev = "31486f40f8e8f8923ca0799aea84b58799754564"; 978 979 sha256 = "sha256-nqT9VZDb2kAC72ot9UCdwEkM1uuP9NriJePulzrdZlM="; 979 980 }; 980 - buildInputs = attrs.buildInputs ++ [ self.libXScrnSaver self.libXfixes self.libXv self.pixman self.utilmacros ]; 981 + buildInputs = attrs.buildInputs ++ [ xorg.libXScrnSaver xorg.libXfixes xorg.libXv xorg.pixman xorg.utilmacros ]; 981 982 nativeBuildInputs = attrs.nativeBuildInputs ++ [autoreconfHook ]; 982 983 configureFlags = [ "--with-default-dri=3" "--enable-tools" ]; 983 984 ··· 987 988 }); 988 989 989 990 xf86videoopenchrome = super.xf86videoopenchrome.overrideAttrs (attrs: { 990 - buildInputs = attrs.buildInputs ++ [ self.libXv ]; 991 + buildInputs = attrs.buildInputs ++ [ xorg.libXv ]; 991 992 patches = [ 992 993 # Pull upstream fix for -fno-common toolchains. 993 994 (fetchpatch {