From 354eecbdfbd7467c23a0fd535aec515353994f4f Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Thu, 25 Apr 2024 22:59:36 -0400 Subject: [PATCH] clear linux patches testing --- hosts/gerg-desktop/main.nix | 1 + packages/clear-patches/package.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 packages/clear-patches/package.nix diff --git a/hosts/gerg-desktop/main.nix b/hosts/gerg-desktop/main.nix index b778a50..d78ac98 100644 --- a/hosts/gerg-desktop/main.nix +++ b/hosts/gerg-desktop/main.nix @@ -165,6 +165,7 @@ }; }; boot = { + kernelPatches = [ self.packages.clear-patches ]; kernelModules = [ "amdgpu" ]; initrd = { availableKernelModules = [ diff --git a/packages/clear-patches/package.nix b/packages/clear-patches/package.nix new file mode 100644 index 0000000..82ff954 --- /dev/null +++ b/packages/clear-patches/package.nix @@ -0,0 +1,18 @@ +{ runCommand, fetchFromGitHub }: + +runCommand "kernel-clr-combined.patch" + { + src = fetchFromGitHub { + owner = "clearlinux-pkgs"; + repo = "linux"; + rev = "65f5cc7a18b6eb108e2b458c5c9d244e2aa8b587"; + hash = "sha256-X8H4j7GpMKVdrwSQxbzUVt7m5mzP/53Nx67YG914Zv0="; + }; + } + '' + cd "$src" + grep -o '^%patch[0-9]*' linux.spec \ + | grep -o '[0-9]*' \ + | xargs -I '{}' grep '^Patch{}:' linux.spec \ + | cut -d" " -f2- | xargs cat >> $out + ''