Unverified Commit 84a3f8ff authored by quantenzitrone's avatar quantenzitrone
Browse files

xf86-input-synaptics: refactor, move to pkgs/by-name & rename from xorg.xf86inputsynaptics

relevant changes:
- switch to GitLab source instead of release tarball
parent 3ffa7005
Loading
Loading
Loading
Loading
+71 −0
Original line number Diff line number Diff line
{
  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;
  };
})
+2 −44
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@
  xev,
  xeyes,
  xf86-input-mouse,
  xf86-input-synaptics,
  xfd,
  xfontsel,
  xfs,
@@ -334,6 +335,7 @@ self: with self; {
  xcbutilwm = libxcb-wm;
  xcursorthemes = xcursor-themes;
  xf86inputmouse = xf86-input-mouse;
  xf86inputsynaptics = xf86-input-synaptics;
  xkeyboardconfig = xkeyboard-config;
  xorgcffiles = xorg-cf-files;
  xorgdocs = xorg-docs;
@@ -532,50 +534,6 @@ self: with self; {
    })
  ) { };

  # 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 (
    {
+2 −0
Original line number Diff line number Diff line
@@ -460,6 +460,7 @@ print OUT <<EOF;
  xev,
  xeyes,
  xf86-input-mouse,
  xf86-input-synaptics,
  xfd,
  xfontsel,
  xfs,
@@ -666,6 +667,7 @@ self: with self; {
  xcbutilwm = libxcb-wm;
  xcursorthemes = xcursor-themes;
  xf86inputmouse = xf86-input-mouse;
  xf86inputsynaptics = xf86-input-synaptics;
  xkeyboardconfig = xkeyboard-config;
  xorgcffiles = xorg-cf-files;
  xorgdocs = xorg-docs;
+0 −11
Original line number Diff line number Diff line
@@ -147,17 +147,6 @@ self: super:
    ];
  });

  xf86inputsynaptics = super.xf86inputsynaptics.overrideAttrs (attrs: {
    outputs = [
      "out"
      "dev"
    ]; # *.pc pulls xorgserver.dev
    configureFlags = [
      "--with-sdkdir=${placeholder "dev"}/include/xorg"
      "--with-xorg-conf-dir=${placeholder "out"}/share/X11/xorg.conf.d"
    ];
  });

  xf86inputvmmouse = super.xf86inputvmmouse.overrideAttrs (attrs: {
    configureFlags = [
      "--sysconfdir=${placeholder "out"}/etc"
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ mirror://xorg/individual/driver/xf86-input-evdev-2.11.0.tar.xz
mirror://xorg/individual/driver/xf86-input-joystick-1.6.4.tar.xz
mirror://xorg/individual/driver/xf86-input-keyboard-2.1.0.tar.xz
mirror://xorg/individual/driver/xf86-input-libinput-1.5.0.tar.xz
mirror://xorg/individual/driver/xf86-input-synaptics-1.10.0.tar.xz
mirror://xorg/individual/driver/xf86-input-vmmouse-13.2.0.tar.xz
mirror://xorg/individual/driver/xf86-input-void-1.4.2.tar.xz
mirror://xorg/individual/driver/xf86-video-amdgpu-23.0.0.tar.xz