diff --git a/pkgs/by-name/xf/xf86-input-mouse/package.nix b/pkgs/by-name/xf/xf86-input-mouse/package.nix new file mode 100644 index 000000000000..4afdfd6bc0c7 --- /dev/null +++ b/pkgs/by-name/xf/xf86-input-mouse/package.nix @@ -0,0 +1,64 @@ +{ + lib, + stdenv, + fetchFromGitLab, + autoreconfHook, + pkg-config, + util-macros, + xorgproto, + xorg-server, + nix-update-script, + testers, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "xf86-input-mouse"; + version = "2.0.0"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + group = "xorg"; + owner = "driver"; + repo = "xf86-input-mouse"; + tag = "xf86-input-mouse-${finalAttrs.version}"; + hash = "sha256-qPP0u7k1g30vw4A1c0fuVbQ9HHovTqWy8OAQ8uMGGg0="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + util-macros + ]; + + buildInputs = [ + util-macros + xorgproto + xorg-server + ]; + + configureFlags = [ "--with-sdkdir=${placeholder "out"}/include/xorg" ]; + + passthru = { + updateScript = nix-update-script { extraArgs = [ "--version-regex=xf86-input-mouse-(.*)" ]; }; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + description = "Mouse input driver for non-Linux platforms for the Xorg X server"; + longDescription = '' + This driver is used on non-Linux operating systems such as BSD & Solaris, as modern Linux + systems use the xf86-input-evdev or xf86-input-libinput drivers instead. + ''; + homepage = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse"; + license = with lib.licenses; [ + mit + hpndSellVariant + x11 + ]; + maintainers = [ ]; + pkgConfigModules = [ "xorg-mouse" ]; + # platforms according to the readme + platforms = with lib.platforms; freebsd ++ netbsd ++ openbsd ++ illumos; + }; +}) diff --git a/pkgs/by-name/xf/xf86-input-synaptics/package.nix b/pkgs/by-name/xf/xf86-input-synaptics/package.nix new file mode 100644 index 000000000000..264d4f3db8e4 --- /dev/null +++ b/pkgs/by-name/xf/xf86-input-synaptics/package.nix @@ -0,0 +1,71 @@ +{ + lib, + stdenv, + fetchFromGitLab, + autoreconfHook, + pkg-config, + util-macros, + xorg-server, + xorgproto, + libevdev, + libx11, + libxi, + libxtst, + nix-update-script, + testers, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "xf86-input-synaptics"; + version = "1.10.0"; + + outputs = [ + "out" + "dev" + ]; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + group = "xorg"; + owner = "driver"; + repo = "xf86-input-synaptics"; + tag = "xf86-input-synaptics-${finalAttrs.version}"; + hash = "sha256-IHkUxphSV6JOlTzIgXGl5hWb6OphJ9Lyzp/YS2phVQs="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + util-macros + xorg-server + ]; + + buildInputs = [ + xorg-server + xorgproto + libevdev + libx11 + libxi + libxtst + ]; + + configureFlags = [ + "--with-sdkdir=${placeholder "dev"}/include/xorg" + "--with-xorg-conf-dir=${placeholder "out"}/share/X11/xorg.conf.d" + ]; + + passthru = { + updateScript = nix-update-script { extraArgs = [ "--version-regex=xf86-input-synaptics-(.*)" ]; }; + tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = { + description = "Synaptics touchpad driver for the Xorg X server"; + homepage = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics"; + license = lib.licenses.mit; + maintainers = [ ]; + pkgConfigModules = [ "xorg-synaptics" ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/by-name/xf/xf86-input-vmmouse/package.nix b/pkgs/by-name/xf/xf86-input-vmmouse/package.nix new file mode 100644 index 000000000000..9b30f1bc861f --- /dev/null +++ b/pkgs/by-name/xf/xf86-input-vmmouse/package.nix @@ -0,0 +1,61 @@ +{ + lib, + stdenv, + fetchFromGitLab, + autoreconfHook, + pkg-config, + util-macros, + xorg-server, + xorgproto, + udev, + nix-update-script, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "xf86-input-vmmouse"; + version = "13.2.0"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + group = "xorg"; + owner = "driver"; + repo = "xf86-input-vmmouse"; + tag = "xf86-input-vmmouse-${finalAttrs.version}"; + hash = "sha256-SasWsIzq9s8i3dabRwKGZ0NSuFqnUu4WCWYTu/ZZpS8="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + util-macros + xorg-server # xorg-server defines autoconf macros that we need + ]; + + buildInputs = [ + xorg-server + xorgproto + udev + ]; + + configureFlags = [ + "--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" + ]; + + passthru = { + updateScript = nix-update-script { extraArgs = [ "--version-regex=xf86-input-vmmouse-(.*)" ]; }; + }; + + meta = { + description = "VMware guest mouse driver for the Xorg X server"; + homepage = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-vmmouse"; + license = with lib.licenses; [ + hpndSellVariant + x11 + ]; + maintainers = [ ]; + platforms = lib.intersectLists lib.platforms.linux lib.platforms.x86; + }; +}) diff --git a/pkgs/by-name/xf/xf86-input-void/package.nix b/pkgs/by-name/xf/xf86-input-void/package.nix new file mode 100644 index 000000000000..c52742e08170 --- /dev/null +++ b/pkgs/by-name/xf/xf86-input-void/package.nix @@ -0,0 +1,59 @@ +{ + lib, + stdenv, + fetchFromGitLab, + autoreconfHook, + pkg-config, + util-macros, + xorg-server, + xorgproto, + nix-update-script, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "xf86-input-void"; + version = "1.4.2"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + group = "xorg"; + owner = "driver"; + repo = "xf86-input-void"; + tag = "xf86-input-void-${finalAttrs.version}"; + hash = "sha256-R2c+FUBJQ9GfMcZ9NKSgT0lfOkqiCKrA+lFVu8l6e10="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + util-macros + ]; + + buildInputs = [ + xorg-server + xorgproto + ]; + + passthru = { + updateScript = nix-update-script { extraArgs = [ "--version-regex=xf86-input-void-(.*)" ]; }; + }; + + meta = { + description = "Null input driver for the Xorg X server"; + longDescription = '' + This is a null input driver for the Xorg X server. + It doesn't connect to any physical device, and it never delivers any events. + It functions as both a pointer and keyboard device, and may be used as the X server's core + pointer and/or core keyboard. + ''; + homepage = "https://gitlab.freedesktop.org/xorg/driver/xf86-input-void"; + license = with lib.licenses; [ + hpndSellVariant + mit + ]; + maintainers = [ ]; + platforms = lib.platforms.unix; + broken = stdenv.hostPlatform.isDarwin; # never worked: https://hydra.nixos.org/job/nixpkgs/trunk/xorg.xf86inputvoid.x86_64-darwin + }; +}) diff --git a/pkgs/by-name/xo/xorg-server/package.nix b/pkgs/by-name/xo/xorg-server/package.nix index bfede48f705a..cc8ac9b2e548 100644 --- a/pkgs/by-name/xo/xorg-server/package.nix +++ b/pkgs/by-name/xo/xorg-server/package.nix @@ -110,6 +110,8 @@ stdenv.mkDerivation (finalAttrs: { dri-pkgconfig-stub libdrm libgbm + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libtirpc ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ @@ -160,6 +162,11 @@ stdenv.mkDerivation (finalAttrs: { "-Dapple-applications-dir=${placeholder "out"}/Applications" "-Dbundle-id-prefix=org.nixos.xquartz" "-Dsha1=CommonCrypto" + ] + ++ lib.optionals (!stdenv.hostPlatform.isLinux) [ + # fixed upstream (unreleased) + "-Dudev=false" + "-Dudev_kms=false" ]; postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index 761789bdd4eb..c450d989311e 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -128,6 +128,10 @@ xdriinfo, xev, xeyes, + xf86-input-mouse, + xf86-input-synaptics, + xf86-input-vmmouse, + xf86-input-void, xfd, xfontsel, xfs, @@ -333,8 +337,12 @@ self: with self; { xcbutil = libxcb-util; xcbutilrenderutil = libxcb-render-util; xcbutilwm = libxcb-wm; - xkeyboardconfig = xkeyboard-config; xcursorthemes = xcursor-themes; + xf86inputmouse = xf86-input-mouse; + xf86inputsynaptics = xf86-input-synaptics; + xf86inputvmmouse = xf86-input-vmmouse; + xf86inputvoid = xf86-input-void; + xkeyboardconfig = xkeyboard-config; xorgcffiles = xorg-cf-files; xorgdocs = xorg-docs; xorgserver = xorg-server; @@ -532,160 +540,6 @@ self: with self; { }) ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! - xf86inputmouse = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - xorgproto, - xorgserver, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "xf86-input-mouse"; - version = "1.9.5"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/driver/xf86-input-mouse-1.9.5.tar.xz"; - sha256 = "0s4rzp7aqpbqm4474hg4bz7i7vg3ir93ck2q12if4lj3nklqmpjg"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - xorgproto - xorgserver - ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ "xorg-mouse" ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - - # THIS IS A GENERATED FILE. DO NOT EDIT! - xf86inputsynaptics = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - xorgproto, - libevdev, - libX11, - libXi, - xorgserver, - libXtst, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "xf86-input-synaptics"; - version = "1.10.0"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/driver/xf86-input-synaptics-1.10.0.tar.xz"; - sha256 = "1hmm3g6ab4bs4hm6kmv508fdc8kr2blzb1vsz1lhipcf0vdnmhp0"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - xorgproto - libevdev - libX11 - libXi - xorgserver - libXtst - ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ "xorg-synaptics" ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - - # THIS IS A GENERATED FILE. DO NOT EDIT! - xf86inputvmmouse = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - xorgproto, - udev, - xorgserver, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "xf86-input-vmmouse"; - version = "13.2.0"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/driver/xf86-input-vmmouse-13.2.0.tar.xz"; - sha256 = "1f1rlgp1rpsan8k4ax3pzhl1hgmfn135r31m80pjxw5q19c7gw2n"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - xorgproto - udev - xorgserver - ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - - # THIS IS A GENERATED FILE. DO NOT EDIT! - xf86inputvoid = callPackage ( - { - stdenv, - pkg-config, - fetchurl, - xorgserver, - xorgproto, - testers, - }: - stdenv.mkDerivation (finalAttrs: { - pname = "xf86-input-void"; - version = "1.4.2"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://xorg/individual/driver/xf86-input-void-1.4.2.tar.xz"; - sha256 = "11bqy2djgb82c1g8ylpfwp3wjw4x83afi8mqyn5fvqp03kidh4d2"; - }; - hardeningDisable = [ - "bindnow" - "relro" - ]; - strictDeps = true; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - xorgserver - xorgproto - ]; - passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; - meta = { - pkgConfigModules = [ ]; - platforms = lib.platforms.unix; - }; - }) - ) { }; - # THIS IS A GENERATED FILE. DO NOT EDIT! xf86videoamdgpu = callPackage ( { diff --git a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl index 48145068c566..a12a0f04a0aa 100755 --- a/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl +++ b/pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl @@ -460,6 +460,10 @@ print OUT <