linux_mptcp: makes linux_mptcp.override works#31596
Conversation
|
@layus for review |
layus
left a comment
There was a problem hiding this comment.
@globin I think this should be reverted. There is already a way to implement the required task without changing nixpkgs. If we really want this change to be merged, we should apply it to all the kernels in nixpkgs, not only this one.
|
|
||
| '' + (args.extraConfig or ""); | ||
| } // (args.argsOverride or {})) | ||
| } // args // (args.argsOverride or {})) |
There was a problem hiding this comment.
It looks like this code was designed to use argsOverride to do what you are doing, not args directly.
In this case, your override should look like
pkg.override ({
argsOverride = {
modDirVersion="4.9.60+";
src=pkgs.lib.cleanSource /home/teto/mptcp;
};
})Now, this may not be the most obvious way to do it. However, I would prefer to keep this consistent with the other kernel implementations.
There was a problem hiding this comment.
I saw the args.argsOverride afterwards. Any technical reason for args.argsOverride or is it legacy ? seeing that there is no specific documentation for kernels, people are bound to look at the nix code either way or use override out of habit.
Btw I would be interested in your opinon over #31463 :)
There was a problem hiding this comment.
Really no idea... You could get more info by blame'ing on original kernels.
There was a problem hiding this comment.
well so far it works but I had lots of trouble compiling the kernel for many reasons; i'll try to send some doc for the manual.
I needed to override some parameters because of an error I had:
"Error: modDirVersion specified in the Nix expression is wrong, it should be: 4.9.60+"
but the following override would not be taken into account
pkg.override ({
modDirVersion="4.9.60+";
src=pkgs.lib.cleanSource /home/teto/mptcp;
})
because the override would be overriden by the nixpkgs parameters
because of concatenation order:
https://nixos.org/nix/manual/#sec-language-operators
argsOverride were introduced in 31fa2cd (NixOS#1654). It seems simpler to just override the default values with the attrs themselves. It also makes it more intuitive to use. (See NixOS#31596).
I needed to override some parameters because of an error I had:
"Error: modDirVersion specified in the Nix expression is wrong, it should be: 4.9.60+"
but the following override would not be taken into account
because the override would be overriden by the nixpkgs parameters
because of concatenation order (https://nixos.org/nix/manual/#sec-language-operators); it was
args // hardcodedand I reversed it tohardcoded // argsMotivation for this change
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)