Commit Graph

16 Commits

Author SHA1 Message Date
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
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Jussi Kuokkanen
95cc312a68 pkgs/os-specific: remove licenses.gpl2 2024-06-21 12:28:43 +03:00
Nick Cao
8c514e6a19
linuxPackages.mba6x_bl: unstable-2016-12-08 -> unstable-2017-12-30
Diff: b96aafd30c...639719f516
2023-07-22 10:12:43 +08:00
Nick Cao
e1f487741f
mba6x_bl: prepend kernel.makeFlags to makeFlags 2022-03-07 12:23:46 +08:00
Felix Buehler
540499bf10 os-specific/linux: replace name with pname&version 2021-08-29 11:28:34 +02:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
volth
08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
Yegor Timoshenko
3619a08f58
mba6x_bl: fix build
*grumble*
2018-01-07 17:49:09 +00:00
Yegor Timoshenko
fbc8fa8b42 mba6x_bl: update to 2016-12-08 2017-09-26 17:08:59 +00:00
Silvan Mosberger
f5fa5fa4d6 pkgs: refactor needless quoting of homepage meta attribute (#27809)
* pkgs: refactor needless quoting of homepage meta attribute

A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.

* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit

* Fixed some instances
2017-08-01 22:03:30 +02:00
aske
0628215f9e linuxPackages.mba6x_bl: 2016-02-12 -> 2016-04-22 2016-09-10 20:27:49 +03:00
Robin Gloster
4666eca487 linuxPackages.mba6x_bl: disable pic hardening 2016-03-29 10:26:32 +00:00
Simon Vandel Sillesen
aac309fa95 mba6x_bl: init at 2016-02-12
This driver fixes backlight after suspend/resume on Macbook Air 6,1
and 6,2.

Added a workaround for https://github.com/patjak/mba6x_bl/issues/43 in
form of a systemd service.

Has been working great on my machine for at least a month now.
2016-03-07 19:01:55 +01:00