Commit Graph

8 Commits

Author SHA1 Message Date
Sam Estep
71d9c5b5bb linuxPackages.lkrg: 1.0.0 -> 1.0.1
Assisted-by: Claude:opus-4.8
2026-06-02 15:09:08 -04:00
magicquark
b3ff25aebd linuxPackages.lkrg: modernise 2025-11-20 03:26:22 +00:00
magicquark
cf9b0fd349 linuxPackages.lkrg: 0.9.9 -> 1.0.0
Release: https://github.com/lkrg-org/lkrg/releases/tag/v1.0.0
Diff: https://github.com/lkrg-org/lkrg/compare/v0.9.9...v1.0.0
2025-11-20 03:20:35 +00:00
Maximilian Bosch
5645cd22d4 linux: expose make flags for modules in linuxKernel.packages.linux_X_Y
Closes #376820

The issue with providing `moduleMakeFlags` via `passthru` of the kernel
package is that when this package gets overriden[1], the `moduleMakeFlags`
list still references the kernel without the overrides.

This broke e.g. kernel modules of linux-rpi4 which can be reproduced
with

    nix-build --argstr system aarch64-linux -A linuxKernel.packages.linux_rpi4.zfs_2_3

This used to break with

    Error: modDirVersion 6.6.51 specified in the Nix expression is wrong, it should be: 6.6.51-v8

since KBUILD_OUTPUT referenced the kernel without the changes from
`overrideDerivation` that also changes the `modDirVersion`.

The new approach is to add the build flags right into
`linuxKernel.packages.linux_X_Y`: that way we don't need any hacks to
update `moduleMakeFlags` when the derivation with the passthru gets
overridden.

By using the fixpoint of the package-set, the `kernelModuleMakeFlags`
list is correctly updated. E.g. given

    with import ./. {};

    linuxKernel.packages.linux_6_6.extend (self: super: {
      kernel = super.kernel.overrideAttrs (_: {
        name = "linux-snens";
      });
    })

the `makeFlags` is correctly updated:

    $ nix-instantiate snenskek.nix -A zfs_2_3.makeFlags --eval --strict
    [ "ARCH=x86_64" "CROSS_COMPILE=" "KBUILD_OUTPUT=/nix/store/gsp68549k1aqbwxwczpgw67w5jjn4shw-linux-snens-dev/lib/modules/6.6.74/build" ]

[1] E.g. `linux-rpi4`.
2025-01-27 16:09:50 +01:00
K900
aa3e94fe7c treewide: kernel.makeFlags -> kernel.moduleMakeFlags 2025-01-23 14:00:43 +03:00
Julian Stecklina
5dca7395b7 linuxPackages.lkrg: 0.9.5 -> 0.9.9 2024-12-03 15:14:15 +01:00
Julian Stecklina
3398fff9b8 linuxPackages.lkrg: use finalAttrs pattern 2024-12-03 15:03:17 +01:00
Hubert Jasudowicz
4a7925fcc4 lkrg: init at 0.9.5 2022-11-10 15:26:53 +01:00