Last active
April 19, 2016 14:22
-
-
Save nshalman/62a32cfc5fbd4a57b9fc69ac85f76ea1 to your computer and use it in GitHub Desktop.
patching the kernel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nixos/modules/profiles/cerana.nix b/nixos/modules/profiles/cerana.nix | |
index 5b312e0..91fb7ea 100644 | |
--- a/nixos/modules/profiles/cerana.nix | |
+++ b/nixos/modules/profiles/cerana.nix | |
@@ -21,4 +21,12 @@ | |
# Configure host id for ZFS to work | |
networking.hostId = lib.mkDefault "8425e349"; | |
+ | |
+ nixpkgs.config.packageOverrides = | |
+ rec { | |
+ linux_4_4 = pkgs.linux_4_4.override { | |
+ kernelPatches = pkgs.linux_4_4.kernelPatches ++ [ pkgs.kernelPatches.delegns_4_4 ]; | |
+ }; | |
+ }; | |
+ | |
} | |
diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix | |
index 707ebb5..5df0cf6 100644 | |
--- a/pkgs/os-specific/linux/kernel/patches.nix | |
+++ b/pkgs/os-specific/linux/kernel/patches.nix | |
@@ -31,6 +31,14 @@ let | |
features.grsecurity = true; | |
}; | |
+ githubBranchPatch = { username, repository ? "linux-stable", base, branch }: | |
+ { name = "${username}-${base}-${branch}"; | |
+ inherit username repository base branch; | |
+ patch = fetchurl { | |
+ url = "https://github.com/${username}/${repository}/compare/${base}...${branch}.patch"; | |
+ }; | |
+ }; | |
+ | |
in | |
rec { | |
@@ -158,4 +166,11 @@ rec { | |
{ name = "qat_common_Makefile"; | |
patch = ./qat_common_Makefile.patch; | |
}; | |
+ | |
+ delegns_4_4 = githubBranchPatch | |
+ { username = "cerana"; | |
+ base = "v4.4.1"; | |
+ branch = "delegns"; | |
+ }; | |
+ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment