2023-10-09 19:29:22 +00:00
|
|
|
{ callPackage,
|
2021-02-05 17:12:51 +00:00
|
|
|
lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages,
|
2023-07-15 17:15:38 +00:00
|
|
|
automake, autoconf, libiconv, libtool, intltool, gettext, python3, perl,
|
2020-10-07 09:15:18 +00:00
|
|
|
freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge,
|
2023-02-02 18:25:31 +00:00
|
|
|
libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm, netbsd,
|
|
|
|
ncompress,
|
2020-04-24 23:36:52 +00:00
|
|
|
mesa, udev, bootstrap_cmds, bison, flex, clangStdenv, autoreconfHook,
|
2022-11-21 17:40:18 +00:00
|
|
|
mcpp, libepoxy, openssl, pkg-config, llvm, libxslt, libxcrypt,
|
|
|
|
ApplicationServices, Carbon, Cocoa, Xplugin,
|
2023-10-09 19:29:22 +00:00
|
|
|
xorg, windows
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-02-05 17:12:51 +00:00
|
|
|
inherit (stdenv) isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
malloc0ReturnsNullCrossFlag = lib.optional
|
2020-04-24 23:36:52 +00:00
|
|
|
(stdenv.hostPlatform != stdenv.buildPlatform)
|
|
|
|
"--enable-malloc0returnsnull";
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
addMainProgram = pkg: { mainProgram ? pkg.pname }: pkg.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // { inherit mainProgram; };
|
|
|
|
});
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
brokenOnDarwin = pkg: pkg.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // { broken = isDarwin; };
|
|
|
|
});
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
self: super:
|
|
|
|
{
|
2023-01-20 10:41:00 +00:00
|
|
|
wrapWithXFileSearchPathHook = callPackage ({ makeBinaryWrapper, makeSetupHook, writeScript }: makeSetupHook {
|
|
|
|
name = "wrapWithXFileSearchPathHook";
|
2023-03-04 12:14:45 +00:00
|
|
|
propagatedBuildInputs = [ makeBinaryWrapper ];
|
2023-01-20 10:41:00 +00:00
|
|
|
} (writeScript "wrapWithXFileSearchPathHook.sh" ''
|
|
|
|
wrapWithXFileSearchPath() {
|
|
|
|
paths=(
|
|
|
|
"$out/share/X11/%T/%N"
|
|
|
|
"$out/include/X11/%T/%N"
|
|
|
|
"${xorg.xbitmaps}/include/X11/%T/%N"
|
|
|
|
)
|
|
|
|
for exe in $out/bin/*; do
|
|
|
|
wrapProgram "$exe" \
|
|
|
|
--suffix XFILESEARCHPATH : $(IFS=:; echo "''${paths[*]}")
|
|
|
|
done
|
|
|
|
}
|
|
|
|
postInstallHooks+=(wrapWithXFileSearchPath)
|
|
|
|
'')) {};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
appres = addMainProgram super.appres { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
bdftopcf = super.bdftopcf.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ xorg.xorgproto ];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "bdftopcf"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
bitmap = addMainProgram super.bitmap { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
editres = super.editres.overrideAttrs (attrs: {
|
|
|
|
hardeningDisable = [ "format" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "editres"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
fontmiscmisc = super.fontmiscmisc.overrideAttrs (attrs: {
|
|
|
|
postInstall =
|
|
|
|
''
|
2022-11-21 17:40:18 +00:00
|
|
|
ALIASFILE=${xorg.fontalias}/share/fonts/X11/misc/fonts.alias
|
2020-04-24 23:36:52 +00:00
|
|
|
test -f $ALIASFILE
|
|
|
|
cp $ALIASFILE $out/lib/X11/fonts/misc/fonts.alias
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
fonttosfnt = super.fonttosfnt.overrideAttrs (attrs: {
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
mainProgram = "fonttosfnt";
|
|
|
|
};
|
2021-06-28 23:13:55 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
gccmakedep = addMainProgram super.gccmakedep { };
|
|
|
|
iceauth = addMainProgram super.iceauth { };
|
|
|
|
ico = addMainProgram super.ico { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
imake = super.imake.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
inherit (xorg) xorgcffiles;
|
2020-04-24 23:36:52 +00:00
|
|
|
x11BuildHook = ./imake.sh;
|
|
|
|
patches = [./imake.patch ./imake-cc-wrapper-uberhack.patch];
|
|
|
|
setupHook = ./imake-setup-hook.sh;
|
|
|
|
CFLAGS = "-DIMAKE_COMPILETIME_CPP='\"${if stdenv.isDarwin
|
|
|
|
then "${tradcpp}/bin/cpp"
|
|
|
|
else "gcc"}\"'";
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
configureFlags = attrs.configureFlags or [] ++ [ "ac_cv_path_RAWCPP=${stdenv.cc.targetPrefix}cpp" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit tradcpp;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
meta = attrs.meta // { mainProgram = "imake"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
mkfontdir = xorg.mkfontscale;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
libxcb = super.libxcb.overrideAttrs (attrs: {
|
2023-10-09 19:29:22 +00:00
|
|
|
# $dev/include/xcb/xcb.h includes pthread.h
|
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64_pthreads;
|
2021-01-05 17:05:55 +00:00
|
|
|
configureFlags = [ "--enable-xkb" "--enable-xinput" ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional stdenv.hostPlatform.isStatic "--disable-shared";
|
2020-04-24 23:36:52 +00:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2023-08-10 07:59:29 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
pkgConfigModules = [
|
|
|
|
"xcb-composite"
|
|
|
|
"xcb-damage"
|
|
|
|
"xcb-dpms"
|
|
|
|
"xcb-dri2"
|
|
|
|
"xcb-dri3"
|
|
|
|
"xcb-glx"
|
|
|
|
"xcb-present"
|
|
|
|
"xcb-randr"
|
|
|
|
"xcb-record"
|
|
|
|
"xcb-render"
|
|
|
|
"xcb-res"
|
|
|
|
"xcb-screensaver"
|
|
|
|
"xcb-shape"
|
|
|
|
"xcb-shm"
|
|
|
|
"xcb-sync"
|
|
|
|
"xcb-xf86dri"
|
|
|
|
"xcb-xfixes"
|
|
|
|
"xcb-xinerama"
|
|
|
|
"xcb-xinput"
|
|
|
|
"xcb-xkb"
|
|
|
|
"xcb-xtest"
|
|
|
|
"xcb-xv"
|
|
|
|
"xcb-xvmc"
|
|
|
|
"xcb"
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
libxcvt = super.libxcvt.overrideAttrs ({ meta ? {}, ... }: {
|
|
|
|
meta = meta // {
|
|
|
|
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxcvt";
|
|
|
|
mainProgram = "cvt";
|
|
|
|
badPlatforms = meta.badPlatforms or [] ++ [
|
|
|
|
lib.systems.inspect.platformPatterns.isStatic
|
|
|
|
];
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libX11 = super.libX11.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "man" ];
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2021-01-05 17:05:55 +00:00
|
|
|
depsBuildBuild = [
|
|
|
|
buildPackages.stdenv.cc
|
2021-01-15 22:18:51 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isStatic [
|
2022-11-21 17:40:18 +00:00
|
|
|
(xorg.buildPackages.stdenv.cc.libc.static or null)
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = ''
|
|
|
|
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
|
|
|
'';
|
2021-01-05 17:05:55 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Remove useless DocBook XML files.
|
|
|
|
rm -rf $out/share/doc
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
CPP = lib.optionalString stdenv.isDarwin "clang -E -";
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libAppleWM = super.libAppleWM.overrideAttrs (attrs: {
|
|
|
|
buildInputs = attrs.buildInputs ++ [ ApplicationServices ];
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace src/Makefile.in --replace -F/System -F${ApplicationServices}
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
libXau = super.libXau.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXdmcp = super.libXdmcp.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2023-08-10 07:59:29 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
pkgConfigModules = [ "xdmcp" ];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
libXtst = super.libXtst.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // {
|
|
|
|
pkgConfigModules = [ "xtst" ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXfont = super.libXfont.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ freetype ]; # propagate link reqs. like bzip2
|
2020-04-24 23:36:52 +00:00
|
|
|
# prevents "misaligned_stack_error_entering_dyld_stub_binder"
|
|
|
|
configureFlags = lib.optional isDarwin "CFLAGS=-O0";
|
|
|
|
});
|
|
|
|
|
|
|
|
libXxf86vm = super.libXxf86vm.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
2020-08-20 17:08:02 +00:00
|
|
|
libXxf86dga = super.libXxf86dga.overrideAttrs (attrs: {
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
libXxf86misc = super.libXxf86misc.overrideAttrs (attrs: {
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
libdmx = super.libdmx.overrideAttrs (attrs: {
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
2023-01-20 10:41:00 +00:00
|
|
|
libFS = super.libFS.overrideAttrs (attrs: {
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
libWindowsWM = super.libWindowsWM.overrideAttrs (attrs: {
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
listres = addMainProgram super.listres { };
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
xdpyinfo = super.xdpyinfo.overrideAttrs (attrs: {
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2021-01-05 17:05:55 +00:00
|
|
|
preConfigure = attrs.preConfigure or ""
|
|
|
|
# missing transitive dependencies
|
2021-01-15 22:18:51 +00:00
|
|
|
+ lib.optionalString stdenv.hostPlatform.isStatic ''
|
2021-01-05 17:05:55 +00:00
|
|
|
export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -lXau -lXdmcp"
|
|
|
|
'';
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
mainProgram = "xdpyinfo";
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
});
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
xdm = super.xdm.overrideAttrs (attrs: {
|
|
|
|
buildInputs = attrs.buildInputs ++ [ libxcrypt ];
|
2022-12-17 10:02:37 +00:00
|
|
|
configureFlags = attrs.configureFlags or [] ++ [
|
|
|
|
"ac_cv_path_RAWCPP=${stdenv.cc.targetPrefix}cpp"
|
|
|
|
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
|
|
|
|
# checking for /dev/urandom... configure: error: cannot check for file existence when cross compiling
|
|
|
|
[ "ac_cv_file__dev_urandom=true" "ac_cv_file__dev_random=true" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "xdm"; };
|
2022-11-21 17:40:18 +00:00
|
|
|
});
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# 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.
|
|
|
|
libXt = super.libXt.overrideAttrs (attrs: {
|
|
|
|
preConfigure = ''
|
|
|
|
sed 's,^as_dummy.*,as_dummy="\$PATH",' -i configure
|
|
|
|
'';
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libSM ];
|
2020-04-24 23:36:52 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
CPP = if stdenv.isDarwin then "clang -E -" else "${stdenv.cc.targetPrefix}cc -E -";
|
2023-02-16 17:41:37 +00:00
|
|
|
outputDoc = "devdoc";
|
2020-04-24 23:36:52 +00:00
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
luit = super.luit.overrideAttrs (attrs: {
|
|
|
|
# See https://bugs.freedesktop.org/show_bug.cgi?id=47792
|
|
|
|
# Once the bug is fixed upstream, this can be removed.
|
|
|
|
configureFlags = [ "--disable-selective-werror" ];
|
|
|
|
|
|
|
|
buildInputs = attrs.buildInputs ++ [libiconv];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "luit"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libICE = super.libICE.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
libXcomposite = super.libXcomposite.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXaw = super.libXaw.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXmu ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXcursor = super.libXcursor.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
libXdamage = super.libXdamage.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
libXft = super.libXft.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXrender freetype fontconfig ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
|
|
|
|
# the include files need ft2build.h, and Requires.private isn't enough for us
|
|
|
|
postInstall = ''
|
|
|
|
sed "/^Requires:/s/$/, freetype2/" -i "$dev/lib/pkgconfig/xft.pc"
|
|
|
|
'';
|
2023-10-19 13:55:26 +00:00
|
|
|
passthru = attrs.passthru // {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit freetype fontconfig;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
libXext = super.libXext.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto xorg.libXau ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
|
|
|
|
libXfixes = super.libXfixes.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
libXi = super.libXi.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXfixes xorg.libXext ];
|
2021-01-15 22:18:51 +00:00
|
|
|
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2021-01-05 17:05:55 +00:00
|
|
|
"xorg_cv_malloc0_returns_null=no"
|
2021-01-15 22:18:51 +00:00
|
|
|
] ++ lib.optional stdenv.hostPlatform.isStatic "--disable-shared";
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXinerama = super.libXinerama.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
|
|
|
|
libXmu = super.libXmu.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
buildFlags = [ "BITMAP_DEFINES='-DBITMAPDIR=\"/no-such-path\"'" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
libXrandr = super.libXrandr.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libXrender ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libSM = super.libSM.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.libICE ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXrender = super.libXrender.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xorgproto ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXres = super.libXres.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
|
|
|
|
libXScrnSaver = super.libXScrnSaver.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = with xorg; attrs.buildInputs ++ [ utilmacros ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
|
|
|
|
libXv = super.libXv.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
|
|
|
});
|
|
|
|
|
|
|
|
libXvMC = super.libXvMC.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
configureFlags = attrs.configureFlags or []
|
|
|
|
++ malloc0ReturnsNullCrossFlag;
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [xorg.xorgproto];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXp = super.libXp.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
libXpm = super.libXpm.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "bin" "dev" "out" ]; # tiny man in $bin
|
|
|
|
patchPhase = "sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in";
|
2023-02-02 18:25:31 +00:00
|
|
|
XPM_PATH_COMPRESS = lib.makeBinPath [ ncompress ];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "sxpm"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libXpresent = super.libXpresent.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = with xorg; attrs.buildInputs ++ [ libXext libXfixes libXrandr ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
libxkbfile = super.libxkbfile.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # mainly to avoid propagation
|
|
|
|
});
|
|
|
|
|
|
|
|
libxshmfence = super.libxshmfence.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # mainly to avoid propagation
|
|
|
|
});
|
|
|
|
|
|
|
|
libpciaccess = super.libpciaccess.overrideAttrs (attrs: {
|
2023-05-24 13:37:59 +00:00
|
|
|
patches = attrs.patches or [] ++ [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/commit/833c86ce15cee2a84a37ae71015f236fd32615d9.patch";
|
|
|
|
hash = "sha256-6koQV+Vse7/OWwuWYrWmBUebHBT+5F32Kkn9V9j+m+Q=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isNetBSD (with netbsd; [ libarch libpci ]);
|
|
|
|
|
|
|
|
meta = attrs.meta // {
|
|
|
|
# https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/blob/master/configure.ac#L108-114
|
|
|
|
platforms = lib.fold (os: ps: ps ++ lib.platforms.${os}) []
|
|
|
|
[ "cygwin" "freebsd" "linux" "netbsd" "openbsd" "illumos" ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
libpthreadstubs = super.libpthreadstubs.overrideAttrs (attrs: {
|
|
|
|
# only contains a pkgconfig file on linux and windows
|
|
|
|
meta = attrs.meta // { platforms = lib.platforms.unix ++ lib.platforms.windows; };
|
|
|
|
});
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
setxkbmap = super.setxkbmap.overrideAttrs (attrs: {
|
|
|
|
postInstall =
|
|
|
|
''
|
2020-11-12 09:05:59 +00:00
|
|
|
mkdir -p $out/share/man/man7
|
2022-11-21 17:40:18 +00:00
|
|
|
ln -sfn ${xorg.xkeyboardconfig}/etc/X11 $out/share/X11
|
|
|
|
ln -sfn ${xorg.xkeyboardconfig}/share/man/man7/xkeyboard-config.7.gz $out/share/man/man7
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "setxkbmap"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
makedepend = addMainProgram super.makedepend { };
|
|
|
|
mkfontscale = addMainProgram super.mkfontscale { };
|
|
|
|
oclock = addMainProgram super.oclock { };
|
|
|
|
smproxy = addMainProgram super.smproxy { };
|
|
|
|
transset = addMainProgram super.transset { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
utilmacros = super.utilmacros.overrideAttrs (attrs: { # not needed for releases, we propagate the needed tools
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ automake autoconf libtool ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
viewres = addMainProgram super.viewres { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
x11perf = super.x11perf.overrideAttrs (attrs: {
|
|
|
|
buildInputs = attrs.buildInputs ++ [ freetype fontconfig ];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "x11perf"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
xcalc = addMainProgram super.xcalc { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xcbutil = super.xcbutil.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
});
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
xcbutilerrors = super.xcbutilerrors.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
|
|
|
});
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xcbutilcursor = super.xcbutilcursor.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = attrs.meta // { maintainers = [ lib.maintainers.lovek323 ]; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xcbutilimage = super.xcbutilimage.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
|
|
|
});
|
|
|
|
|
|
|
|
xcbutilkeysyms = super.xcbutilkeysyms.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
|
|
|
});
|
|
|
|
|
|
|
|
xcbutilrenderutil = super.xcbutilrenderutil.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
|
|
|
});
|
|
|
|
|
|
|
|
xcbutilwm = super.xcbutilwm.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # mainly to get rid of propagating others
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86inputevdev = super.xf86inputevdev.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # to get rid of xorgserver.dev; man is tiny
|
|
|
|
preBuild = "sed -e '/motion_history_proc/d; /history_size/d;' -i src/*.c";
|
2021-09-18 10:52:07 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-sdkdir=${placeholder "dev"}/include/xorg"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86inputmouse = super.xf86inputmouse.overrideAttrs (attrs: {
|
2021-09-18 10:52:07 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-sdkdir=${placeholder "out"}/include/xorg"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
broken = isDarwin; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86inputmouse.x86_64-darwin
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xf86inputjoystick = super.xf86inputjoystick.overrideAttrs (attrs: {
|
2021-09-18 10:52:07 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-sdkdir=${placeholder "out"}/include/xorg"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
broken = isDarwin; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86inputjoystick.x86_64-darwin
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
xf86inputkeyboard = super.xf86inputkeyboard.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = lib.platforms.freebsd ++ lib.platforms.netbsd ++ lib.platforms.openbsd;
|
|
|
|
};
|
|
|
|
});
|
2022-05-18 14:49:53 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xf86inputlibinput = super.xf86inputlibinput.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ];
|
2021-09-18 10:52:07 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-sdkdir=${placeholder "dev"}/include/xorg"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86inputsynaptics = super.xf86inputsynaptics.overrideAttrs (attrs: {
|
|
|
|
outputs = [ "out" "dev" ]; # *.pc pulls xorgserver.dev
|
2021-09-18 10:52:07 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-sdkdir=${placeholder "dev"}/include/xorg"
|
|
|
|
"--with-xorg-conf-dir=${placeholder "out"}/share/X11/xorg.conf.d"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86inputvmmouse = super.xf86inputvmmouse.overrideAttrs (attrs: {
|
|
|
|
configureFlags = [
|
2021-02-05 17:12:51 +00:00
|
|
|
"--sysconfdir=${placeholder "out"}/etc"
|
|
|
|
"--with-xorg-conf-dir=${placeholder "out"}/share/X11/xorg.conf.d"
|
|
|
|
"--with-udev-rules-dir=${placeholder "out"}/lib/udev/rules.d"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
xf86inputvoid = brokenOnDarwin super.xf86inputvoid; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86inputvoid.x86_64-darwin
|
|
|
|
xf86videodummy = brokenOnDarwin super.xf86videodummy; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86videodummy.x86_64-darwin
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Obsolete drivers that don't compile anymore.
|
|
|
|
xf86videoark = super.xf86videoark.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videogeode = super.xf86videogeode.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videoglide = super.xf86videoglide.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videoi128 = super.xf86videoi128.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videonewport = super.xf86videonewport.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videos3virge = super.xf86videos3virge.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videosavage = super.xf86videosavage.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videotga = super.xf86videotga.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videov4l = super.xf86videov4l.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videovoodoo = super.xf86videovoodoo.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
xf86videowsfb = super.xf86videowsfb.overrideAttrs (attrs: { meta = attrs.meta // { broken = true; }; });
|
|
|
|
|
|
|
|
xf86videoomap = super.xf86videoomap.overrideAttrs (attrs: {
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=format-overflow" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xf86videoamdgpu = super.xf86videoamdgpu.overrideAttrs (attrs: {
|
|
|
|
configureFlags = [ "--with-xorg-conf-dir=$(out)/share/X11/xorg.conf.d" ];
|
|
|
|
});
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
xf86videonouveau = super.xf86videonouveau.overrideAttrs (attrs: {
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ];
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ];
|
2022-08-12 12:06:08 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xf86videoglint = super.xf86videoglint.overrideAttrs (attrs: {
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook ];
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ xorg.utilmacros ];
|
2022-08-12 12:06:08 +00:00
|
|
|
# https://gitlab.freedesktop.org/xorg/driver/xf86-video-glint/-/issues/1
|
|
|
|
meta = attrs.meta // { broken = true; };
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86videosuncg6 = super.xf86videosuncg6.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // { broken = isDarwin; }; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86videosuncg6.x86_64-darwin
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86videosunffb = super.xf86videosunffb.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // { broken = isDarwin; }; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86videosunffb.x86_64-darwin
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86videosunleo = super.xf86videosunleo.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // { broken = isDarwin; }; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86videosunleo.x86_64-darwin
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: {
|
2021-04-26 19:14:03 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ mesa mesa.driversdev llvm ]; # for libxatracker
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=address" ]; # gcc12
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86videoqxl = super.xf86videoqxl.overrideAttrs (attrs: {
|
|
|
|
buildInputs = attrs.buildInputs ++ [ spice-protocol ];
|
|
|
|
});
|
|
|
|
|
|
|
|
xf86videosiliconmotion = super.xf86videosiliconmotion.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
xdriinfo = super.xdriinfo.overrideAttrs (attrs: {
|
|
|
|
buildInputs = attrs.buildInputs ++ [libGL];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "xdriinfo"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
xev = addMainProgram super.xev { };
|
|
|
|
xeyes = addMainProgram super.xeyes { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xvinfo = super.xvinfo.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [xorg.libXext];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "xvinfo"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xkbcomp = super.xkbcomp.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
configureFlags = [ "--with-xkb-config-root=${xorg.xkeyboardconfig}/share/X11/xkb" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "xkbcomp"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xkeyboardconfig = super.xkeyboardconfig.overrideAttrs (attrs: {
|
2023-07-15 17:15:38 +00:00
|
|
|
prePatch = ''
|
|
|
|
patchShebangs rules/merge.py rules/compat/map-variants.py rules/xml2lst.pl
|
|
|
|
'';
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
python3
|
|
|
|
perl
|
|
|
|
libxslt # xsltproc
|
|
|
|
gettext # msgfmt
|
|
|
|
];
|
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonBool "xorg-rules-symlinks" true)
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
# 1: compatibility for X11/xkb location
|
2021-02-05 17:12:51 +00:00
|
|
|
# 2: I think pkg-config/ is supposed to be in /lib/
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
ln -s share "$out/etc"
|
|
|
|
mkdir -p "$out/lib" && ln -s ../share/pkgconfig "$out/lib/"
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
# xkeyboardconfig variant extensible with custom layouts.
|
|
|
|
# See nixos/modules/services/x11/extra-layouts.nix
|
|
|
|
xkeyboardconfig_custom = { layouts ? { } }:
|
|
|
|
let
|
|
|
|
patchIn = name: layout:
|
|
|
|
with layout;
|
|
|
|
with lib;
|
|
|
|
''
|
|
|
|
# install layout files
|
|
|
|
${optionalString (compatFile != null) "cp '${compatFile}' 'compat/${name}'"}
|
|
|
|
${optionalString (geometryFile != null) "cp '${geometryFile}' 'geometry/${name}'"}
|
|
|
|
${optionalString (keycodesFile != null) "cp '${keycodesFile}' 'keycodes/${name}'"}
|
|
|
|
${optionalString (symbolsFile != null) "cp '${symbolsFile}' 'symbols/${name}'"}
|
|
|
|
${optionalString (typesFile != null) "cp '${typesFile}' 'types/${name}'"}
|
|
|
|
|
|
|
|
# add model description
|
|
|
|
${ed}/bin/ed -v rules/base.xml <<EOF
|
|
|
|
/<\/modelList>
|
|
|
|
-
|
|
|
|
a
|
|
|
|
<model>
|
|
|
|
<configItem>
|
|
|
|
<name>${name}</name>
|
|
|
|
<description>${layout.description}</description>
|
|
|
|
<vendor>${layout.description}</vendor>
|
|
|
|
</configItem>
|
|
|
|
</model>
|
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# add layout description
|
|
|
|
${ed}/bin/ed -v rules/base.xml <<EOF
|
|
|
|
/<\/layoutList>
|
|
|
|
-
|
|
|
|
a
|
|
|
|
<layout>
|
|
|
|
<configItem>
|
|
|
|
<name>${name}</name>
|
|
|
|
<shortDescription>${name}</shortDescription>
|
|
|
|
<description>${layout.description}</description>
|
|
|
|
<languageList>
|
|
|
|
${concatMapStrings (lang: "<iso639Id>${lang}</iso639Id>\n") layout.languages}
|
|
|
|
</languageList>
|
|
|
|
</configItem>
|
|
|
|
<variantList/>
|
|
|
|
</layout>
|
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
in
|
2022-11-21 17:40:18 +00:00
|
|
|
xorg.xkeyboardconfig.overrideAttrs (old: {
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = old.buildInputs ++ [ automake ];
|
|
|
|
postPatch = with lib; concatStrings (mapAttrsToList patchIn layouts);
|
|
|
|
});
|
|
|
|
|
|
|
|
xlsfonts = super.xlsfonts.overrideAttrs (attrs: {
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // {
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
mainProgram = "xlsfonts";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xorgproto = super.xorgproto.overrideAttrs (attrs: {
|
|
|
|
buildInputs = [];
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = [];
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ meson ninja ];
|
|
|
|
# adds support for printproto needed for libXp
|
|
|
|
mesonFlags = [ "-Dlegacy=true" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://aur.archlinux.org/cgit/aur.git/plain/meson.patch?h=mingw-w64-xorgproto&id=7b817efc3144a50e6766817c4ca7242f8ce49307";
|
|
|
|
sha256 = "sha256-Izzz9In53W7CC++k1bLr78iSrmxpFm1cH8qcSpptoUQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
meta = attrs.meta // { platforms = lib.platforms.unix ++ lib.platforms.windows; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
xorgserver = with xorg; super.xorgserver.overrideAttrs (attrs_passed:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
2023-10-09 19:29:22 +00:00
|
|
|
attrs = attrs_passed // {
|
|
|
|
buildInputs = attrs_passed.buildInputs ++
|
|
|
|
lib.optional (libdrm != null) libdrm.dev;
|
|
|
|
postPatch = ''
|
|
|
|
for i in dri3/*.c
|
|
|
|
do
|
|
|
|
sed -i -e "s|#include <drm_fourcc.h>|#include <libdrm/drm_fourcc.h>|" $i
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
meta = attrs_passed.meta // { mainProgram = "X"; };
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
in attrs //
|
|
|
|
(let
|
|
|
|
version = lib.getVersion attrs;
|
2023-03-08 16:32:21 +00:00
|
|
|
commonBuildInputs = attrs.buildInputs ++ [ xtrans libxcvt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
commonPropagatedBuildInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
dbus libGL libGLU libXext libXfont libXfont2 libepoxy libunwind
|
|
|
|
libxshmfence pixman xorgproto zlib
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
# XQuartz requires two compilations: the first to get X / XQuartz,
|
|
|
|
# and the second to get Xvfb, Xnest, etc.
|
2023-01-11 07:51:40 +00:00
|
|
|
darwinOtherX = xorgserver.overrideAttrs (oldAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = oldAttrs.configureFlags ++ [
|
|
|
|
"--disable-xquartz"
|
|
|
|
"--enable-xorg"
|
|
|
|
"--enable-xvfb"
|
|
|
|
"--enable-xnest"
|
|
|
|
"--enable-kdrive"
|
|
|
|
];
|
|
|
|
postInstall = ":"; # prevent infinite recursion
|
|
|
|
});
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
fpgit = commit: sha256: name: fetchpatch (
|
|
|
|
{
|
|
|
|
url = "https://gitlab.freedesktop.org/xorg/xserver/-/commit/${commit}.diff";
|
|
|
|
inherit sha256;
|
|
|
|
} // lib.optionalAttrs (name != null) {
|
|
|
|
name = name + ".patch";
|
|
|
|
}
|
|
|
|
);
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
if (!isDarwin)
|
|
|
|
then {
|
|
|
|
outputs = [ "out" "dev" ];
|
2020-12-25 13:55:36 +00:00
|
|
|
patches = [
|
|
|
|
# The build process tries to create the specified logdir when building.
|
|
|
|
#
|
|
|
|
# We set it to /var/log which can't be touched from inside the sandbox causing the build to hard-fail
|
|
|
|
./dont-create-logdir-during-build.patch
|
|
|
|
];
|
2023-03-08 16:32:21 +00:00
|
|
|
buildInputs = commonBuildInputs ++ [ libdrm mesa ];
|
2023-03-04 12:14:45 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ libpciaccess ] ++ commonPropagatedBuildInputs ++ lib.optionals stdenv.isLinux [
|
2020-04-24 23:36:52 +00:00
|
|
|
udev
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2021-01-15 22:18:51 +00:00
|
|
|
prePatch = lib.optionalString stdenv.hostPlatform.isMusl ''
|
2020-04-24 23:36:52 +00:00
|
|
|
export CFLAGS+=" -D__uid_t=uid_t -D__gid_t=gid_t"
|
|
|
|
'';
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-kdrive" # not built by default
|
|
|
|
"--enable-xephyr"
|
|
|
|
"--enable-xcsecurity" # enable SECURITY extension
|
|
|
|
"--with-default-font-path=" # there were only paths containing "${prefix}",
|
|
|
|
# and there are no fonts in this package anyway
|
2022-11-21 17:40:18 +00:00
|
|
|
"--with-xkb-bin-directory=${xorg.xkbcomp}/bin"
|
|
|
|
"--with-xkb-path=${xorg.xkeyboardconfig}/share/X11/xkb"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--with-xkb-output=$out/share/X11/xkb/compiled"
|
2020-12-25 13:55:36 +00:00
|
|
|
"--with-log-dir=/var/log"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--enable-glamor"
|
2021-07-14 22:03:04 +00:00
|
|
|
"--with-os-name=Nix" # r13y, embeds the build machine's kernel version otherwise
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
|
|
|
"--disable-tls"
|
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2023-02-16 17:41:37 +00:00
|
|
|
# Needed with GCC 12
|
|
|
|
"-Wno-error=array-bounds"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm -fr $out/share/X11/xkb/compiled # otherwise X will try to write in it
|
|
|
|
( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others
|
|
|
|
cd "$dev"
|
|
|
|
for f in include/xorg/*.h; do
|
2021-06-28 23:13:55 +00:00
|
|
|
sed "1i#line 1 \"${attrs.pname}-${attrs.version}/$f\"" -i "$f"
|
2020-04-24 23:36:52 +00:00
|
|
|
done
|
|
|
|
)
|
|
|
|
'';
|
2023-10-19 13:55:26 +00:00
|
|
|
passthru = attrs.passthru // {
|
|
|
|
inherit version; # needed by virtualbox guest additions
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
} else {
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ autoreconfHook bootstrap_cmds xorg.utilmacros xorg.fontutil ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = commonBuildInputs ++ [
|
|
|
|
bootstrap_cmds automake autoconf
|
|
|
|
Xplugin Carbon Cocoa
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = commonPropagatedBuildInputs ++ [
|
|
|
|
libAppleWM xorgproto
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# XQuartz patchset
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/e88fd6d785d5be477d5598e70d105ffb804771aa.patch";
|
|
|
|
sha256 = "1q0a30m1qj6ai924afz490xhack7rg4q3iig2gxsjjh98snikr1k";
|
|
|
|
name = "use-cppflags-not-cflags.patch";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/75ee9649bcfe937ac08e03e82fd45d9e18110ef4.patch";
|
|
|
|
sha256 = "1vlfylm011y00j8mig9zy6gk9bw2b4ilw2qlsc6la49zi3k0i9fg";
|
|
|
|
name = "use-old-mitrapezoids-and-mitriangles-routines.patch";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/c58f47415be79a6564a9b1b2a62c2bf866141e73.patch";
|
|
|
|
sha256 = "19sisqzw8x2ml4lfrwfvavc2jfyq2bj5xcf83z89jdxg8g1gdd1i";
|
|
|
|
name = "revert-fb-changes-1.patch";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/XQuartz/xorg-server/commit/56e6f1f099d2821e5002b9b05b715e7b251c0c97.patch";
|
|
|
|
sha256 = "0zm9g0g1jvy79sgkvy0rjm6ywrdba2xjd1nsnjbxjccckbr6i396";
|
|
|
|
name = "revert-fb-changes-2.patch";
|
|
|
|
})
|
2023-05-24 13:37:59 +00:00
|
|
|
./darwin/bundle_main.patch
|
|
|
|
./darwin/stub.patch
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = attrs.postPatch + ''
|
|
|
|
substituteInPlace hw/xquartz/mach-startup/stub.c \
|
|
|
|
--subst-var-by XQUARTZ_APP "$out/Applications/XQuartz.app"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
|
|
|
# note: --enable-xquartz is auto
|
|
|
|
"CPPFLAGS=-I${./darwin/dri}"
|
2023-03-04 12:14:45 +00:00
|
|
|
"--disable-glamor"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--with-default-font-path="
|
|
|
|
"--with-apple-application-name=XQuartz"
|
|
|
|
"--with-apple-applications-dir=\${out}/Applications"
|
|
|
|
"--with-bundle-id-prefix=org.nixos.xquartz"
|
|
|
|
"--with-sha1=CommonCrypto"
|
2023-05-24 13:37:59 +00:00
|
|
|
"--with-xkb-bin-directory=${xorg.xkbcomp}/bin"
|
|
|
|
"--with-xkb-path=${xorg.xkeyboardconfig}/share/X11/xkb"
|
|
|
|
"--with-xkb-output=$out/share/X11/xkb/compiled"
|
2023-03-15 16:39:30 +00:00
|
|
|
"--without-dtrace" # requires Command Line Tools for Xcode
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error"
|
|
|
|
substituteInPlace hw/xquartz/pbproxy/Makefile.in --replace -F/System -F${ApplicationServices}
|
|
|
|
'';
|
|
|
|
postInstall = ''
|
|
|
|
rm -fr $out/share/X11/xkb/compiled
|
|
|
|
|
|
|
|
cp -rT ${darwinOtherX}/bin $out/bin
|
|
|
|
rm -f $out/bin/X
|
|
|
|
ln -s Xquartz $out/bin/X
|
|
|
|
|
|
|
|
cp ${darwinOtherX}/share/man -rT $out/share/man
|
|
|
|
'' ;
|
2023-10-19 13:55:26 +00:00
|
|
|
passthru = attrs.passthru // {
|
|
|
|
inherit version;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}));
|
|
|
|
|
|
|
|
lndir = super.lndir.overrideAttrs (attrs: {
|
|
|
|
buildInputs = [];
|
|
|
|
preConfigure = ''
|
|
|
|
export XPROTO_CFLAGS=" "
|
|
|
|
export XPROTO_LIBS=" "
|
|
|
|
substituteInPlace lndir.c \
|
|
|
|
--replace '<X11/Xos.h>' '<string.h>' \
|
|
|
|
--replace '<X11/Xfuncproto.h>' '<unistd.h>' \
|
|
|
|
--replace '_X_ATTRIBUTE_PRINTF(1,2)' '__attribute__((__format__(__printf__,1,2)))' \
|
|
|
|
--replace '_X_ATTRIBUTE_PRINTF(2,3)' '__attribute__((__format__(__printf__,2,3)))' \
|
|
|
|
--replace '_X_NORETURN' '__attribute__((noreturn))' \
|
|
|
|
--replace 'n_dirs--;' ""
|
|
|
|
'';
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "lndir"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
twm = super.twm.overrideAttrs (attrs: {
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [bison flex];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "twm"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xauth = super.xauth.overrideAttrs (attrs: {
|
|
|
|
doCheck = false; # fails
|
2021-01-05 17:05:55 +00:00
|
|
|
preConfigure = attrs.preConfigure or ""
|
|
|
|
# missing transitive dependencies
|
2021-01-15 22:18:51 +00:00
|
|
|
+ lib.optionalString stdenv.hostPlatform.isStatic ''
|
2021-01-05 17:05:55 +00:00
|
|
|
export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -lxcb -lXau -lXdmcp"
|
|
|
|
'';
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "xauth"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
xbacklight = addMainProgram super.xbacklight { };
|
|
|
|
xclock = addMainProgram super.xclock { };
|
|
|
|
xcmsdb = addMainProgram super.xcmsdb { };
|
|
|
|
xcompmgr = addMainProgram super.xcompmgr { };
|
|
|
|
xconsole = addMainProgram super.xconsole { };
|
|
|
|
xcursorgen = addMainProgram super.xcursorgen { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xcursorthemes = super.xcursorthemes.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ xorg.xcursorgen ];
|
|
|
|
buildInputs = attrs.buildInputs ++ [ xorg.xorgproto ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [ "--with-cursordir=$(out)/share/icons" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
xinit = (super.xinit.override {
|
|
|
|
stdenv = if isDarwin then clangStdenv else stdenv;
|
|
|
|
}).overrideAttrs (attrs: {
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ lib.optional isDarwin bootstrap_cmds;
|
2021-10-17 09:34:42 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [
|
2022-11-21 17:40:18 +00:00
|
|
|
"--with-xserver=${xorg.xorgserver.out}/bin/X"
|
2020-04-24 23:36:52 +00:00
|
|
|
] ++ lib.optionals isDarwin [
|
|
|
|
"--with-bundle-id-prefix=org.nixos.xquartz"
|
|
|
|
"--with-launchdaemons-dir=\${out}/LaunchDaemons"
|
|
|
|
"--with-launchagents-dir=\${out}/LaunchAgents"
|
|
|
|
];
|
2021-10-17 09:34:42 +00:00
|
|
|
postPatch = ''
|
|
|
|
# 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"
|
|
|
|
'';
|
2022-11-21 17:40:18 +00:00
|
|
|
propagatedBuildInputs = attrs.propagatedBuildInputs or [] ++ [ xorg.xauth ]
|
|
|
|
++ lib.optionals isDarwin [ xorg.libX11 xorg.xorgproto ];
|
2020-12-25 13:55:36 +00:00
|
|
|
postFixup = ''
|
2022-12-02 08:20:57 +00:00
|
|
|
substituteInPlace $out/bin/startx \
|
|
|
|
--replace $out/etc/X11/xinit/xserverrc /etc/X11/xinit/xserverrc \
|
|
|
|
--replace $out/etc/X11/xinit/xinitrc /etc/X11/xinit/xinitrc
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "xinit"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xf86videointel = super.xf86videointel.overrideAttrs (attrs: {
|
|
|
|
# the update script only works with released tarballs :-/
|
2022-04-27 09:35:20 +00:00
|
|
|
name = "xf86-video-intel-2021-01-15";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
group = "xorg";
|
|
|
|
owner = "driver";
|
|
|
|
repo = "xf86-video-intel";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "31486f40f8e8f8923ca0799aea84b58799754564";
|
|
|
|
sha256 = "sha256-nqT9VZDb2kAC72ot9UCdwEkM1uuP9NriJePulzrdZlM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-01-20 10:41:00 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ xorg.libXScrnSaver xorg.libXv xorg.pixman xorg.utilmacros ];
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [autoreconfHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [ "--with-default-dri=3" "--enable-tools" ];
|
2023-03-08 16:32:21 +00:00
|
|
|
patches = [ ./use_crocus_and_iris.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = attrs.meta // {
|
|
|
|
platforms = ["i686-linux" "x86_64-linux"];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
xf86videoopenchrome = super.xf86videoopenchrome.overrideAttrs (attrs: {
|
2022-11-21 17:40:18 +00:00
|
|
|
buildInputs = attrs.buildInputs ++ [ xorg.libXv ];
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
# Pull upstream fix for -fno-common toolchains.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/freedesktop/openchrome-xf86-video-openchrome/commit/edb46574d4686c59e80569ba236d537097dcdd0e.patch";
|
|
|
|
sha256 = "0xqawg9zzwb7x5vaf3in60isbkl3zfjq0wcnfi45s3hiii943sxz";
|
|
|
|
})
|
|
|
|
];
|
2021-04-05 15:23:46 +00:00
|
|
|
});
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xf86videoxgi = super.xf86videoxgi.overrideAttrs (attrs: {
|
|
|
|
patches = [
|
|
|
|
# fixes invalid open mode
|
|
|
|
# https://cgit.freedesktop.org/xorg/driver/xf86-video-xgi/commit/?id=bd94c475035739b42294477cff108e0c5f15ef67
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://cgit.freedesktop.org/xorg/driver/xf86-video-xgi/patch/?id=bd94c475035739b42294477cff108e0c5f15ef67";
|
|
|
|
sha256 = "0myfry07655adhrpypa9rqigd6rfx57pqagcwibxw7ab3wjay9f6";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://cgit.freedesktop.org/xorg/driver/xf86-video-xgi/patch/?id=78d1138dd6e214a200ca66fa9e439ee3c9270ec8";
|
|
|
|
sha256 = "0z3643afgrync280zrp531ija0hqxc5mrwjif9nh9lcnzgnz2d6d";
|
|
|
|
})
|
2022-06-16 17:23:12 +00:00
|
|
|
# Pull upstream fix for -fno-common toolchains.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/freedesktop/xorg-xf86-video-xgi/commit/3143bdee580c4d397e21adb0fa35502d4dc8e888.patch";
|
|
|
|
sha256 = "0by6k26rj1xmljnbfd08v90s1f9bkmnf17aclhv50081m83lmm07";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
xfd = addMainProgram super.xfd { };
|
|
|
|
xfontsel = addMainProgram super.xfontsel { };
|
|
|
|
xfs = addMainProgram super.xfs { };
|
|
|
|
xfsinfo = addMainProgram super.xfsinfo { };
|
|
|
|
xgamma = addMainProgram super.xgamma { };
|
|
|
|
xgc = addMainProgram super.xgc { };
|
|
|
|
xhost = addMainProgram super.xhost { };
|
|
|
|
xinput = addMainProgram super.xinput { };
|
|
|
|
xkbevd = addMainProgram super.xkbevd { };
|
|
|
|
xkbprint = addMainProgram super.xkbprint { };
|
|
|
|
xkill = addMainProgram super.xkill { };
|
|
|
|
xload = addMainProgram super.xload { };
|
|
|
|
xlsatoms = addMainProgram super.xlsatoms { };
|
|
|
|
xlsclients = addMainProgram super.xlsclients { };
|
|
|
|
xmag = addMainProgram super.xmag { };
|
|
|
|
xmessage = addMainProgram super.xmessage { };
|
|
|
|
xmodmap = addMainProgram super.xmodmap { };
|
|
|
|
xmore = addMainProgram super.xmore { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xorgcffiles = super.xorgcffiles.overrideAttrs (attrs: {
|
2021-01-15 22:18:51 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace $out/lib/X11/config/darwin.cf --replace "/usr/bin/" ""
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
xorgdocs = super.xorgdocs.overrideAttrs (attrs: {
|
|
|
|
# This makes the man pages discoverable by the default man,
|
|
|
|
# since it looks for packages in $PATH
|
|
|
|
postInstall = "mkdir $out/bin";
|
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
xpr = addMainProgram super.xpr { };
|
|
|
|
xprop = addMainProgram super.xprop { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
xrdb = super.xrdb.overrideAttrs (attrs: {
|
|
|
|
configureFlags = [ "--with-cpp=${mcpp}/bin/mcpp" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "xrdb"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
sessreg = super.sessreg.overrideAttrs (attrs: {
|
|
|
|
preBuild = "sed -i 's|gcc -E|gcc -E -P|' man/Makefile";
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = attrs.meta // { mainProgram = "sessreg"; };
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
xrandr = super.xrandr.overrideAttrs (attrs: {
|
|
|
|
postInstall = ''
|
|
|
|
rm $out/bin/xkeystone
|
|
|
|
'';
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = attrs.meta // {
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "xrandr";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
xrefresh = addMainProgram super.xrefresh { };
|
|
|
|
xset = addMainProgram super.xset { };
|
|
|
|
xsetroot = addMainProgram super.xsetroot { };
|
|
|
|
xsm = addMainProgram super.xsm { };
|
|
|
|
xstdcmap = addMainProgram super.xstdcmap { };
|
|
|
|
xwd = addMainProgram super.xwd { };
|
|
|
|
xwininfo = addMainProgram super.xwininfo { };
|
|
|
|
xwud = addMainProgram super.xwud { };
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
# convert Type1 vector fonts to OpenType fonts
|
|
|
|
fontbitstreamtype1 = super.fontbitstreamtype1.overrideAttrs (attrs: {
|
|
|
|
nativeBuildInputs = attrs.nativeBuildInputs ++ [ fontforge ];
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
# convert Postscript (Type 1) font to otf
|
|
|
|
for i in $(find -type f -name '*.pfa' -o -name '*.pfb'); do
|
|
|
|
name=$(basename $i | cut -d. -f1)
|
|
|
|
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$name.otf\")"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# install the otf fonts
|
|
|
|
fontDir="$out/lib/X11/fonts/misc/"
|
|
|
|
install -D -m 644 -t "$fontDir" *.otf
|
|
|
|
mkfontscale "$fontDir"
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
# mark some packages as unfree
|
|
|
|
// (
|
|
|
|
let
|
|
|
|
# unfree but redistributable
|
|
|
|
redist = [
|
|
|
|
"fontadobeutopiatype1"
|
|
|
|
"fontadobeutopia100dpi"
|
|
|
|
"fontadobeutopia75dpi"
|
|
|
|
"fontbhtype1"
|
|
|
|
"fontibmtype1"
|
|
|
|
"fontbhttf"
|
|
|
|
"fontbh100dpi"
|
|
|
|
"fontbh75dpi"
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
# Bigelow & Holmes fonts
|
|
|
|
# https://www.x.org/releases/current/doc/xorg-docs/License.html#Bigelow_Holmes_Inc_and_URW_GmbH_Luxi_font_license
|
|
|
|
"fontbhlucidatypewriter100dpi"
|
|
|
|
"fontbhlucidatypewriter75dpi"
|
2020-10-07 09:15:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# unfree, possibly not redistributable
|
|
|
|
unfree = [
|
|
|
|
# no license, just a copyright notice
|
|
|
|
"fontdaewoomisc"
|
|
|
|
|
|
|
|
# unclear license, "permission to use"?
|
|
|
|
"fontjismisc"
|
|
|
|
];
|
|
|
|
|
|
|
|
setLicense = license: name:
|
|
|
|
super.${name}.overrideAttrs (attrs: {
|
|
|
|
meta = attrs.meta // { inherit license; };
|
|
|
|
});
|
|
|
|
mapNamesToAttrs = f: names: with lib;
|
|
|
|
listToAttrs (zipListsWith nameValuePair names (map f names));
|
|
|
|
|
|
|
|
in
|
|
|
|
mapNamesToAttrs (setLicense lib.licenses.unfreeRedistributable) redist //
|
|
|
|
mapNamesToAttrs (setLicense lib.licenses.unfree) unfree
|
|
|
|
)
|