From 1a7742929974c6dec9b8c99d8c200953512384c0 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 6 Nov 2022 23:57:53 +0200 Subject: [PATCH 1/5] xorg.xdm: add libxcrypt to buildInputs --- pkgs/servers/x11/xorg/overrides.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 5ac7967c60f7..f29028a68dd5 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -4,7 +4,7 @@ freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge, libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, mesa, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook, - mcpp, libepoxy, openssl, pkg-config, llvm, libxslt, + mcpp, libepoxy, openssl, pkg-config, llvm, libxslt, libxcrypt, ApplicationServices, Carbon, Cocoa, Xplugin }: @@ -152,6 +152,10 @@ self: super: ''; }); + xdm = super.xdm.overrideAttrs (attrs: { + buildInputs = attrs.buildInputs ++ [ libxcrypt ]; + }); + # Propagate some build inputs because of header file dependencies. # Note: most of these are in Requires.private, so maybe builder.sh # should propagate them automatically. From 6381e4475e72bd6805d5ab87af74aba0056d12fb Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 6 Nov 2022 23:59:18 +0200 Subject: [PATCH 2/5] xorg: improve splicing situtation --- pkgs/servers/x11/xorg/default.nix | 10 ++-- .../x11/xorg/generate-expr-from-tarballs.pl | 6 +-- pkgs/servers/x11/xorg/tarballs.list | 2 +- pkgs/top-level/all-packages.nix | 48 ++++++++++++++----- 4 files changed, 44 insertions(+), 22 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 2449ca6c245a..59ec6ac71586 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -1,7 +1,7 @@ # THIS IS A GENERATED FILE. DO NOT EDIT! -{ lib, newScope, pixman }: +{ lib, pixman }: -lib.makeScope newScope (self: with self; { +self: with self; { inherit pixman; @@ -1976,7 +1976,7 @@ lib.makeScope newScope (self: with self; { }) {}; # THIS IS A GENERATED FILE. DO NOT EDIT! - xdm = callPackage ({ stdenv, pkg-config, fetchurl, libX11, libXau, libXaw, libXdmcp, libXext, libXft, libXinerama, libXmu, libXpm, libxcrypt, xorgproto, libXrender, libXt }: stdenv.mkDerivation { + xdm = callPackage ({ stdenv, pkg-config, fetchurl, libX11, libXau, libXaw, libXdmcp, libXext, libXft, libXinerama, libXmu, libXpm, xorgproto, libXrender, libXt }: stdenv.mkDerivation { pname = "xdm"; version = "1.1.12"; builder = ./builder.sh; @@ -1987,7 +1987,7 @@ lib.makeScope newScope (self: with self; { hardeningDisable = [ "bindnow" "relro" ]; strictDeps = true; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libX11 libXau libXaw libXdmcp libXext libXft libXinerama libXmu libXpm xorgproto libXrender libXt libxcrypt ]; + buildInputs = [ libX11 libXau libXaw libXdmcp libXext libXft libXinerama libXmu libXpm xorgproto libXrender libXt ]; meta.platforms = lib.platforms.unix; }) {}; @@ -3559,4 +3559,4 @@ lib.makeScope newScope (self: with self; { meta.platforms = lib.platforms.unix; }) {}; -}) +} diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index d236eb3cbc41..d3848773cb72 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -250,9 +250,9 @@ open OUT, ">default.nix"; print OUT ""; print OUT < Date: Mon, 7 Nov 2022 00:32:10 +0200 Subject: [PATCH 3/5] xorg: fix the cross-compilation of fonts --- pkgs/servers/x11/xorg/default.nix | 34 +++++++++++++++++++ .../x11/xorg/generate-expr-from-tarballs.pl | 1 + 2 files changed, 35 insertions(+) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 59ec6ac71586..a52a8291af27 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -99,6 +99,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -116,6 +117,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -133,6 +135,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -150,6 +153,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -167,6 +171,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -200,6 +205,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -217,6 +223,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -234,6 +241,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -251,6 +259,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -268,6 +277,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -285,6 +295,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -302,6 +313,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -319,6 +331,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -336,6 +349,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -353,6 +367,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -370,6 +385,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -387,6 +403,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -404,6 +421,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -421,6 +439,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -438,6 +457,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -455,6 +475,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -472,6 +493,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -489,6 +511,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -506,6 +529,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -523,6 +547,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -540,6 +565,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -557,6 +583,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -574,6 +601,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -591,6 +619,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -608,6 +637,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -625,6 +655,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -642,6 +673,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -691,6 +723,7 @@ self: with self; { nativeBuildInputs = [ pkg-config bdftopcf mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; @@ -708,6 +741,7 @@ self: with self; { nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ fontutil ]; configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ]; + postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' ''; meta.platforms = lib.platforms.unix; }) {}; diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index d3848773cb72..2ddb18904350 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -192,6 +192,7 @@ while (<>) { if ($isFont) { push @requires, "fontutil"; push @{$extraAttrs{$pkg}}, "configureFlags = [ \"--with-fontrootdir=\$(out)/lib/X11/fonts\" ];"; + push @{$extraAttrs{$pkg}}, "postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`\$PKG_CONFIG' '';"; } sub process { From d6a9e82668d7eb02ac90a820763b9df5b9d23485 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 7 Nov 2022 00:50:42 +0200 Subject: [PATCH 4/5] xorg: detect if XORG_FONT_REQUIRED_PROG(MKFONTSCALE in generate-expr-from-tarballs --- pkgs/servers/x11/xorg/default.nix | 4 ++-- pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl | 2 +- pkgs/servers/x11/xorg/overrides.nix | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index a52a8291af27..179b50fb1ab7 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -70,7 +70,7 @@ self: with self; { }) {}; # THIS IS A GENERATED FILE. DO NOT EDIT! - encodings = callPackage ({ stdenv, pkg-config, fetchurl }: stdenv.mkDerivation { + encodings = callPackage ({ stdenv, pkg-config, fetchurl, mkfontscale }: stdenv.mkDerivation { pname = "encodings"; version = "1.0.5"; builder = ./builder.sh; @@ -80,7 +80,7 @@ self: with self; { }; hardeningDisable = [ "bindnow" "relro" ]; strictDeps = true; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config mkfontscale ]; buildInputs = [ ]; meta.platforms = lib.platforms.unix; }) {}; diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 2ddb18904350..987895ab6e1d 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -154,7 +154,7 @@ while (<>) { push @nativeRequires, "bdftopcf"; } - if ($file =~ /AC_PATH_PROG\(MKFONTSCALE/) { + if ($file =~ /AC_PATH_PROG\(MKFONTSCALE/ || $file =~ /XORG_FONT_REQUIRED_PROG\(MKFONTSCALE/) { push @nativeRequires, "mkfontscale"; } diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index f29028a68dd5..21cc67c30614 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -41,10 +41,6 @@ self: super: ''; }); - encodings = super.encodings.overrideAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs ++ [ self.mkfontscale ]; - }); - editres = super.editres.overrideAttrs (attrs: { hardeningDisable = [ "format" ]; }); From 7e00495eae9f5e53594ec8fd9e591f296248bd69 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 7 Nov 2022 06:59:09 +0200 Subject: [PATCH 5/5] xorg: use top-level xorg instead of self in overrides.nix the packages will be spliced correctly --- pkgs/servers/x11/xorg/overrides.nix | 83 +++++++++++++++-------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 21cc67c30614..baf968fe309f 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -5,7 +5,8 @@ libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, mesa, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook, mcpp, libepoxy, openssl, pkg-config, llvm, libxslt, libxcrypt, - ApplicationServices, Carbon, Cocoa, Xplugin + ApplicationServices, Carbon, Cocoa, Xplugin, + xorg }: let @@ -23,7 +24,7 @@ in self: super: { bdftopcf = super.bdftopcf.overrideAttrs (attrs: { - buildInputs = attrs.buildInputs ++ [ self.xorgproto ]; + buildInputs = attrs.buildInputs ++ [ xorg.xorgproto ]; }); bitmap = super.bitmap.overrideAttrs (attrs: { @@ -32,7 +33,7 @@ self: super: paths=( "$out/share/X11/%T/%N" "$out/include/X11/%T/%N" - "${self.xbitmaps}/include/X11/%T/%N" + "${xorg.xbitmaps}/include/X11/%T/%N" ) wrapProgram "$out/bin/bitmap" \ --suffix XFILESEARCHPATH : $(IFS=:; echo "''${paths[*]}") @@ -48,7 +49,7 @@ self: super: fontmiscmisc = super.fontmiscmisc.overrideAttrs (attrs: { postInstall = '' - ALIASFILE=${self.fontalias}/share/fonts/X11/misc/fonts.alias + ALIASFILE=${xorg.fontalias}/share/fonts/X11/misc/fonts.alias test -f $ALIASFILE cp $ALIASFILE $out/lib/X11/fonts/misc/fonts.alias ''; @@ -59,7 +60,7 @@ self: super: }); imake = super.imake.overrideAttrs (attrs: { - inherit (self) xorgcffiles; + inherit (xorg) xorgcffiles; x11BuildHook = ./imake.sh; patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch]; setupHook = ./imake-setup-hook.sh; @@ -70,7 +71,7 @@ self: super: inherit tradcpp; }); - mkfontdir = self.mkfontscale; + mkfontdir = xorg.mkfontscale; libxcb = super.libxcb.overrideAttrs (attrs: { configureFlags = [ "--enable-xkb" "--enable-xinput" ] @@ -85,7 +86,7 @@ self: super: depsBuildBuild = [ buildPackages.stdenv.cc ] ++ lib.optionals stdenv.hostPlatform.isStatic [ - (self.buildPackages.stdenv.cc.libc.static or null) + (xorg.buildPackages.stdenv.cc.libc.static or null) ]; preConfigure = '' sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure @@ -95,7 +96,7 @@ self: super: rm -rf $out/share/doc ''; CPP = lib.optionalString stdenv.isDarwin "clang -E -"; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ]; }); libAppleWM = super.libAppleWM.overrideAttrs (attrs: { @@ -107,7 +108,7 @@ self: super: libXau = super.libXau.overrideAttrs (attrs: { outputs = [ "out" "dev" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ]; }); libXdmcp = super.libXdmcp.overrideAttrs (attrs: { @@ -161,7 +162,7 @@ self: super: ''; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libSM ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libSM ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; CPP = if stdenv.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -"; outputs = [ "out" "dev" "devdoc" ]; @@ -181,12 +182,12 @@ self: super: libXcomposite = super.libXcomposite.overrideAttrs (attrs: { outputs = [ "out" "dev" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXfixes ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes ]; }); libXaw = super.libXaw.overrideAttrs (attrs: { outputs = [ "out" "dev" "devdoc" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXmu ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXmu ]; }); libXcursor = super.libXcursor.overrideAttrs (attrs: { @@ -199,7 +200,7 @@ self: super: libXft = super.libXft.overrideAttrs (attrs: { outputs = [ "out" "dev" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXrender freetype fontconfig ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXrender freetype fontconfig ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; @@ -214,7 +215,7 @@ self: super: libXext = super.libXext.overrideAttrs (attrs: { outputs = [ "out" "dev" "man" "doc" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto self.libXau ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto xorg.libXau ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; }); @@ -225,7 +226,7 @@ self: super: libXi = super.libXi.overrideAttrs (attrs: { outputs = [ "out" "dev" "man" "doc" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXfixes self.libXext ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes xorg.libXext ]; configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "xorg_cv_malloc0_returns_null=no" ] ++ lib.optional stdenv.hostPlatform.isStatic "--disable-shared"; @@ -246,30 +247,30 @@ self: super: outputs = [ "out" "dev" ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libXrender ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXrender ]; }); libSM = super.libSM.overrideAttrs (attrs: { outputs = [ "out" "dev" "doc" ]; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.libICE ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libICE ]; }); libXrender = super.libXrender.overrideAttrs (attrs: { outputs = [ "out" "dev" "doc" ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xorgproto ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ]; }); libXres = super.libXres.overrideAttrs (attrs: { outputs = [ "out" "dev" "devdoc" ]; - buildInputs = with self; attrs.buildInputs ++ [ utilmacros ]; + buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; }); libXScrnSaver = super.libXScrnSaver.overrideAttrs (attrs: { - buildInputs = with self; attrs.buildInputs ++ [ utilmacros ]; + buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; }); @@ -284,7 +285,7 @@ self: super: outputs = [ "out" "dev" "doc" ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag; - buildInputs = attrs.buildInputs ++ [self.xorgproto]; + buildInputs = attrs.buildInputs ++ [xorg.xorgproto]; }); libXp = super.libXp.overrideAttrs (attrs: { @@ -297,7 +298,7 @@ self: super: }); libXpresent = super.libXpresent.overrideAttrs (attrs: { - buildInputs = with self; attrs.buildInputs ++ [ libXext libXfixes libXrandr ]; + buildInputs = with xorg; attrs.buildInputs ++ [ libXext libXfixes libXrandr ]; }); libxkbfile = super.libxkbfile.overrideAttrs (attrs: { @@ -321,8 +322,8 @@ self: super: postInstall = '' mkdir -p $out/share/man/man7 - ln -sfn ${self.xkeyboardconfig}/etc/X11 $out/share/X11 - ln -sfn ${self.xkeyboardconfig}/share/man/man7/xkeyboard-config.7.gz $out/share/man/man7 + ln -sfn ${xorg.xkeyboardconfig}/etc/X11 $out/share/X11 + ln -sfn ${xorg.xkeyboardconfig}/share/man/man7/xkeyboard-config.7.gz $out/share/man/man7 ''; }); @@ -444,7 +445,7 @@ self: super: xf86videoati = super.xf86videoati.overrideAttrs (attrs: { nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ]; - buildInputs = attrs.buildInputs ++ [ self.utilmacros ]; + buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ]; patches = [ (fetchpatch { url = "https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/commit/e0511968d04b42abf11bc0ffb387f143582bc144.patch"; @@ -455,12 +456,12 @@ self: super: xf86videonouveau = super.xf86videonouveau.overrideAttrs (attrs: { nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ]; - buildInputs = attrs.buildInputs ++ [ self.utilmacros ]; + buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ]; }); xf86videoglint = super.xf86videoglint.overrideAttrs (attrs: { nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ]; - buildInputs = attrs.buildInputs ++ [ self.utilmacros ]; + buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ]; # https://gitlab.freedesktop.org/xorg/driver/xf86-video-glint/-/issues/1 meta = attrs.meta // { broken = true; }; }); @@ -599,11 +600,11 @@ self: super: }); xvinfo = super.xvinfo.overrideAttrs (attrs: { - buildInputs = attrs.buildInputs ++ [self.libXext]; + buildInputs = attrs.buildInputs ++ [xorg.libXext]; }); xkbcomp = super.xkbcomp.overrideAttrs (attrs: { - configureFlags = [ "--with-xkb-config-root=${self.xkeyboardconfig}/share/X11/xkb" ]; + configureFlags = [ "--with-xkb-config-root=${xorg.xkeyboardconfig}/share/X11/xkb" ]; }); xkeyboardconfig = super.xkeyboardconfig.overrideAttrs (attrs: { @@ -693,7 +694,7 @@ self: super: EOF ''; in - self.xkeyboardconfig.overrideAttrs (old: { + xorg.xkeyboardconfig.overrideAttrs (old: { buildInputs = old.buildInputs ++ [ automake ]; postPatch = with lib; concatStrings (mapAttrsToList patchIn layouts); }); @@ -714,7 +715,7 @@ self: super: mesonFlags = [ "-Dlegacy=true" ]; }); - xorgserver = with self; super.xorgserver.overrideAttrs (attrs_passed: + xorgserver = with xorg; super.xorgserver.overrideAttrs (attrs_passed: # exchange attrs if abiCompat is set let version = lib.getVersion attrs_passed; @@ -821,8 +822,8 @@ self: super: "--enable-xcsecurity" # enable SECURITY extension "--with-default-font-path=" # there were only paths containing "${prefix}", # and there are no fonts in this package anyway - "--with-xkb-bin-directory=${self.xkbcomp}/bin" - "--with-xkb-path=${self.xkeyboardconfig}/share/X11/xkb" + "--with-xkb-bin-directory=${xorg.xkbcomp}/bin" + "--with-xkb-path=${xorg.xkeyboardconfig}/share/X11/xkb" "--with-xkb-output=$out/share/X11/xkb/compiled" "--with-log-dir=/var/log" "--enable-glamor" @@ -842,7 +843,7 @@ self: super: ''; passthru.version = version; # needed by virtualbox guest additions } else { - nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook self.utilmacros self.fontutil ]; + nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook xorg.utilmacros xorg.fontutil ]; buildInputs = commonBuildInputs ++ [ bootstrap_cmds automake autoconf Xplugin Carbon Cocoa @@ -930,8 +931,8 @@ self: super: }); xcursorthemes = super.xcursorthemes.overrideAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs ++ [ self.xcursorgen ]; - buildInputs = attrs.buildInputs ++ [ self.xorgproto ]; + nativeBuildInputs = attrs.nativeBuildInputs ++ [ xorg.xcursorgen ]; + buildInputs = attrs.buildInputs ++ [ xorg.xorgproto ]; configureFlags = [ "--with-cursordir=$(out)/share/icons" ]; }); @@ -941,7 +942,7 @@ self: super: buildInputs = attrs.buildInputs ++ lib.optional isDarwin bootstrap_cmds; depsBuildBuild = [ buildPackages.stdenv.cc ]; configureFlags = [ - "--with-xserver=${self.xorgserver.out}/bin/X" + "--with-xserver=${xorg.xorgserver.out}/bin/X" ] ++ lib.optionals isDarwin [ "--with-bundle-id-prefix=org.nixos.xquartz" "--with-launchdaemons-dir=\${out}/LaunchDaemons" @@ -959,8 +960,8 @@ self: super: # Avoid replacement of word-looking cpp's builtin macros in Nix's cross-compiled paths substituteInPlace Makefile.in --replace "PROGCPPDEFS =" "PROGCPPDEFS = -Dlinux=linux -Dunix=unix" ''; - propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ self.xauth ] - ++ lib.optionals isDarwin [ self.libX11 self.xorgproto ]; + propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xauth ] + ++ lib.optionals isDarwin [ xorg.libX11 xorg.xorgproto ]; postFixup = '' substituteInPlace $out/bin/startx --replace $out/etc/X11/xinit/xserverrc /etc/X11/xinit/xserverrc ''; @@ -977,7 +978,7 @@ self: super: rev = "31486f40f8e8f8923ca0799aea84b58799754564"; sha256 = "sha256-nqT9VZDb2kAC72ot9UCdwEkM1uuP9NriJePulzrdZlM="; }; - buildInputs = attrs.buildInputs ++ [ self.libXScrnSaver self.libXfixes self.libXv self.pixman self.utilmacros ]; + buildInputs = attrs.buildInputs ++ [ xorg.libXScrnSaver xorg.libXfixes xorg.libXv xorg.pixman xorg.utilmacros ]; nativeBuildInputs = attrs.nativeBuildInputs ++ [autoreconfHook ]; configureFlags = [ "--with-default-dri=3" "--enable-tools" ]; @@ -987,7 +988,7 @@ self: super: }); xf86videoopenchrome = super.xf86videoopenchrome.overrideAttrs (attrs: { - buildInputs = attrs.buildInputs ++ [ self.libXv ]; + buildInputs = attrs.buildInputs ++ [ xorg.libXv ]; patches = [ # Pull upstream fix for -fno-common toolchains. (fetchpatch {