Unverified Commit 50d4f7d5 authored by quantenzitrone's avatar quantenzitrone
Browse files

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

relevant changes:
- switch to GitLab source instead of release tarball
parent 84a3f8ff
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
{
  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;
  };
})
+2 −38
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@
  xeyes,
  xf86-input-mouse,
  xf86-input-synaptics,
  xf86-input-vmmouse,
  xfd,
  xfontsel,
  xfs,
@@ -336,6 +337,7 @@ self: with self; {
  xcursorthemes = xcursor-themes;
  xf86inputmouse = xf86-input-mouse;
  xf86inputsynaptics = xf86-input-synaptics;
  xf86inputvmmouse = xf86-input-vmmouse;
  xkeyboardconfig = xkeyboard-config;
  xorgcffiles = xorg-cf-files;
  xorgdocs = xorg-docs;
@@ -534,44 +536,6 @@ self: with self; {
    })
  ) { };

  # 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 (
    {
+2 −0
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@ print OUT <<EOF;
  xeyes,
  xf86-input-mouse,
  xf86-input-synaptics,
  xf86-input-vmmouse,
  xfd,
  xfontsel,
  xfs,
@@ -668,6 +669,7 @@ self: with self; {
  xcursorthemes = xcursor-themes;
  xf86inputmouse = xf86-input-mouse;
  xf86inputsynaptics = xf86-input-synaptics;
  xf86inputvmmouse = xf86-input-vmmouse;
  xkeyboardconfig = xkeyboard-config;
  xorgcffiles = xorg-cf-files;
  xorgdocs = xorg-docs;
+0 −15
Original line number Diff line number Diff line
@@ -147,21 +147,6 @@ self: super:
    ];
  });

  xf86inputvmmouse = super.xf86inputvmmouse.overrideAttrs (attrs: {
    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"
    ];

    meta = attrs.meta // {
      platforms = [
        "i686-linux"
        "x86_64-linux"
      ];
    };
  });

  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

+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-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
mirror://xorg/individual/driver/xf86-video-apm-1.3.0.tar.bz2