Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

msi-ec: 0-unstable-2024-09-19 -> 0-unstable-2024-11-04

m1dugh dd086ca4 7c7453a8

+33 -40
+5 -13
pkgs/os-specific/linux/msi-ec/default.nix
··· 8 }: 9 stdenv.mkDerivation { 10 pname = "msi-ec-kmods"; 11 - version = "0-unstable-2024-09-19"; 12 13 src = fetchFromGitHub { 14 owner = "BeardOverflow"; 15 repo = "msi-ec"; 16 - rev = "94c2a45c04a07096e10d7cb1240e1a201a025dc0"; 17 - hash = "sha256-amJUoIf5Sl62BLyHLeam2fzN1s+APoWh2dH5QVfJhCs="; 18 }; 19 20 dontMakeSourcesWritable = false; 21 22 - postPatch = 23 - let 24 - targets = builtins.filter (v: v != "") [ 25 - (lib.strings.optionalString (kernel.kernelOlder "6.2") "older-kernel-patch") 26 - (lib.strings.optionalString (kernel.kernelAtLeast "6.11") "6.11-kernel-patch") 27 - ]; 28 - commands = builtins.map (target: "make ${target}") targets; 29 - in 30 - lib.concatStringsSep "\n" ([ "cp ${./patches/Makefile} ./Makefile" ] ++ commands); 31 32 hardeningDisable = [ "pic" ]; 33 ··· 48 license = lib.licenses.gpl2Plus; 49 maintainers = [ lib.maintainers.m1dugh ]; 50 platforms = lib.platforms.linux; 51 - broken = kernel.kernelOlder "6.2"; 52 }; 53 }
··· 8 }: 9 stdenv.mkDerivation { 10 pname = "msi-ec-kmods"; 11 + version = "0-unstable-2024-11-04"; 12 13 src = fetchFromGitHub { 14 owner = "BeardOverflow"; 15 repo = "msi-ec"; 16 + rev = "be6f7156cd15f6ecf9d48dfcc30cbd1f693916b8"; 17 + hash = "sha256-gImiP4OaBt80n+qgVnbhd0aS/zW+05o3DzGCw0jq+0g="; 18 }; 19 20 dontMakeSourcesWritable = false; 21 22 + patches = [ ./patches/makefile.patch ]; 23 24 hardeningDisable = [ "pic" ]; 25 ··· 40 license = lib.licenses.gpl2Plus; 41 maintainers = [ lib.maintainers.m1dugh ]; 42 platforms = lib.platforms.linux; 43 + broken = kernel.kernelOlder "5.5"; 44 }; 45 }
-27
pkgs/os-specific/linux/msi-ec/patches/Makefile
··· 1 - # Out of the box, the build with this Makefile only works in FHS environments, 2 - # such as on Ubuntu or Debian. On NixOS, you either need to open an FHS 3 - # environment using a Nix shell or build this from a specially crafted Nix 4 - # derivation. 5 - # 6 - # This file follows the conventions written down here: 7 - # https://docs.kernel.org/kbuild/modules.html 8 - # Make it possible to override the kernel src tree location from Nix derivation. 9 - KERNEL ?= $(shell uname -r) 10 - KERNELDIR ?= /lib/modules/$(KERNEL)/build/ 11 - ccflags-y := -std=gnu11 -Wno-declaration-after-statement 12 - .PHONY: default 13 - default: modules 14 - # -m: Build as module. 15 - obj-m = msi-ec.o 16 - .PHONY: modules 17 - modules: 18 - @#"M=": Module source. Special variable of the kernel's main Makefile. 19 - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules 20 - .PHONY: modules_install 21 - modules_install: 22 - $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install 23 - 6.11-kernel-patch: 24 - git apply 6.11-kernel.patch 25 - 26 - older-kernel-patch: 27 - git apply older-kernel.patch
···
+28
pkgs/os-specific/linux/msi-ec/patches/makefile.patch
···
··· 1 + diff --git a/Makefile b/Makefile 2 + index bffcbd4..fd1d8a3 100644 3 + --- a/Makefile 4 + +++ b/Makefile 5 + @@ -1,6 +1,7 @@ 6 + VERSION := 0.08 7 + DKMS_ROOT_PATH := /usr/src/msi_ec-$(VERSION) 8 + TARGET ?= $(shell uname -r) 9 + +KERNELDIR ?= /lib/modules/$(TARGET)/build/ 10 + 11 + ccflags-y := -std=gnu11 -Wno-declaration-after-statement 12 + 13 + @@ -10,11 +11,14 @@ obj-m += msi-ec.o 14 + all: modules 15 + 16 + modules: 17 + - @$(MAKE) -C /lib/modules/$(TARGET)/build M=$(CURDIR) modules 18 + + @$(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules 19 + 20 + clean: 21 + @$(MAKE) -C /lib/modules/$(TARGET)/build M=$(CURDIR) clean 22 + 23 + +modules_install: 24 + + @$(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules_install 25 + + 26 + load: 27 + insmod msi-ec.ko 28 +