Commit c1534703 authored by Fazzi's avatar Fazzi Committed by Masum Reza
Browse files

linuxPackages.xone: 0.3-unstable-2024-04-25 -> 0.3-unstable-2024-12-23

switch to a fork of the original repo from dlundqvist. It already
contains commits to fix builds for 6.11+ kernels, and contains other
minor changes. This allows us to drop the patches which we were
previously applying. The upstream repo from medusalix seems to be abandoned,
and the maintainer of said repo hasn't had any communication on the
support discord server since March 2024.
parent 2ec87b6b
Loading
Loading
Loading
Loading
+5 −23
Original line number Diff line number Diff line
@@ -3,37 +3,19 @@
  lib,
  fetchFromGitHub,
  kernel,
  fetchpatch,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "xone";
  version = "0.3-unstable-2024-04-25";
  version = "0.3-unstable-2024-12-23";

  src = fetchFromGitHub {
    owner = "medusalix";
    owner = "dlundqvist";
    repo = "xone";
    rev = "29ec3577e52a50f876440c81267f609575c5161e";
    hash = "sha256-ZKIV8KtrFEyabQYzWpxz2BvOAXKV36ufTI87VpIfkFs=";
    rev = "6b9d59aed71f6de543c481c33df4705d4a590a31";
    hash = "sha256-MpxP2cb0KEPKaarjfX/yCbkxIFTwwEwVpTMhFcis+A4=";
  };

  patches = [
    # Fix build on kernel 6.11
    # https://github.com/medusalix/xone/pull/48
    (fetchpatch {
      name = "kernel-6.11.patch";
      url = "https://github.com/medusalix/xone/commit/28df566c38e0ee500fd5f74643fc35f21a4ff696.patch";
      hash = "sha256-X14oZmxqqZJoBZxPXGZ9R8BAugx/hkSOgXlGwR5QCm8=";
    })
    # Fix build on kernel 6.12
    # https://github.com/medusalix/xone/pull/53
    (fetchpatch {
      name = "kernel-6.12.patch";
      url = "https://github.com/medusalix/xone/commit/d88ea1e8b430d4b96134e43ca1892ac48334578e.patch";
      hash = "sha256-zQK1tuxu2ZmKxPO0amkfcT/RFBSkU2pWD0qhGyCCHXI=";
    })
  ];

  setSourceRoot = ''
    export sourceRoot=$(pwd)/${finalAttrs.src.name}
  '';
@@ -54,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: {

  meta = with lib; {
    description = "Linux kernel driver for Xbox One and Xbox Series X|S accessories";
    homepage = "https://github.com/medusalix/xone";
    homepage = "https://github.com/dlundqvist/xone";
    license = licenses.gpl2Plus;
    maintainers = with lib.maintainers; [
      rhysmdnz