chore: format repo using treefmt-nix and nixfmt-rfc-style

This commit is contained in:
Andre
2025-06-04 12:11:03 -04:00
parent fc7c471412
commit 51e51e6014
266 changed files with 3721 additions and 2733 deletions

View File

@@ -16,7 +16,7 @@
# `hid-multitouch-onenetbook4` is the fixed one, don't use `hid-multitouch`.
boot.blacklistedKernelModules = [ "hid-multitouch" ];
boot.extraModulePackages = [
(config.boot.kernelPackages.callPackage ./goodix-stylus-mastykin {})
(config.boot.kernelPackages.callPackage ./goodix-stylus-mastykin { })
];
# OneNetbook 4 has an accelerometer,

View File

@@ -1,4 +1,11 @@
{ stdenv, lib, kernel, fetchpatch, runCommand, patch }:
{
stdenv,
lib,
kernel,
fetchpatch,
runCommand,
patch,
}:
let
patch1_original = fetchpatch {
@@ -6,24 +13,18 @@ let
name = "goodix-stylus-mastykin-1-pen-support.patch";
sha256 = "sha256-1oc8OvfhScYvtsMeV9A4hU+09i59tEJ6HZS6jspsJR8=";
};
patch1_updated_5_12_12 = runCommand
"goodix-stylus-mastykin-1-pen-support-5.12.12.patch" {}
''
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./5.12.12.patch.patch}
'';
patch1_updated_6_1 = runCommand
"goodix-stylus-mastykin-1-pen-support-6.1.patch" {}
''
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./6.1.patch.patch}
'';
patch1_updated_6_12 = runCommand
"goodix-stylus-mastykin-1-pen-support-6.12.patch" {}
''
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./6.12.patch.patch}
'';
patch1_updated_5_12_12 = runCommand "goodix-stylus-mastykin-1-pen-support-5.12.12.patch" { } ''
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./5.12.12.patch.patch}
'';
patch1_updated_6_1 = runCommand "goodix-stylus-mastykin-1-pen-support-6.1.patch" { } ''
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./6.1.patch.patch}
'';
patch1_updated_6_12 = runCommand "goodix-stylus-mastykin-1-pen-support-6.12.patch" { } ''
cat ${patch1_original} > $out
${patch}/bin/patch $out < ${./6.12.patch.patch}
'';
patch1 =
if (lib.versionAtLeast kernel.version "6.12") then
patch1_updated_6_12
@@ -31,7 +32,8 @@ let
patch1_updated_6_1
else if (lib.versionAtLeast kernel.version "5.12.12") then
patch1_updated_5_12_12
else patch1_original;
else
patch1_original;
patch2 = fetchpatch {
url = "https://marc.info/?l=linux-input&m=161847127221531&q=p4";
name = "goodix-stylus-mastykin-2-buttons.patch";
@@ -42,11 +44,17 @@ stdenv.mkDerivation rec {
name = "hid-multitouch-onenetbook4-${version}";
inherit (kernel) version;
hardeningDisable = [ "pic" "format" ];
hardeningDisable = [
"pic"
"format"
];
nativeBuildInputs = kernel.moduleBuildDependencies;
src = ./.;
patches = [ patch1 patch2 ];
patches = [
patch1
patch2
];
postUnpack = ''
tar -C goodix-stylus-mastykin \