Bonjour.
J’ai un portable récent (XMG EVO 14) dont la carte réseau n’est pas encore supportée.
Heureusement pour moi, quelqu’un a déjà proposé un patch à nixpkgs qui fonctionne.
(pkgs: add Motorcomm YT6801 out of tree kernel module by bartvdbraak · Pull Request #354347 · NixOS/nixpkgs · GitHub ).
Du coup, j’ai cloné le dépôt nixpkgs, mergé ce PR, et adapté configuration.nix : ça marche.
Mais c’est pas idéal pour les mises-à-jour. Je suis obligé de d’abord récupérer les modifs de nixpkgs, et rebaser le PR ci-dessus.
Il doit très certainement y avoir un moyen pour expliquer à nix que je veux utiliser le channel habituel, mais juste merger le patch pré-cité ?
Cordialement
Matt
Salut, avec flake tu devrais pouvoir utiliser applyPatches
1 Like
Aie. Je ne comprends pas cette histoire de flake
…
Dans la page en référence, il y a :
First you will need to apply the Nixpkgs PR patch to some copy of Nixpkgs. In this example we will assume a Flake (flake.nix
) that has an input nixpkgs-unstable
pointing to nixos-unstable
:
C’est justement ce que je voudrais éviter : d’avoir à cloner Nixpkgs ?
Si tu ne veux pas t’embéter avec flake, je pense que le plus simple c’est de copier le fichier de la PR, disons dans /etc/nixos/yt6801/default.nix
, puis de remplacer toutes les occurences de yt6801
par (config.boot.kernelPackages.callPackage ./yt6801/default.nix {})
, du coup si tu le charges dans extraModulePackages
, tu dois mettre dans ta config un truc du genre:
boot.extraModulePackages = [
(config.boot.kernelPackages.callPackage ./yt6801/default.nix {})
];
2 Likes
J’ai abandonné mon PR en raison du travail actif effectué dans le PR suivant :
NixOS:master
← 5aaee9:master
opened 11:11AM - 18 Oct 24 UTC
<!--
^ Please summarise the changes you have done and explain why they are nece… ssary here ^
For package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.
For new packages please briefly describe the package or provide a link to its homepage.
-->
## Things done
- Built on platform(s)
- [x] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- For non-Linux: Is sandboxing enabled in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] `sandbox = relaxed`
- [ ] `sandbox = true`
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#linking-nixos-module-tests-to-a-package) to the relevant packages
- [x] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [x] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [24.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2411.section.md) (or backporting [23.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) and [24.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2405.section.md) Release notes)
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#reviewing-contributions
-->
---
Add a :+1: [reaction] to [pull requests you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[pull requests you find important]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc
J’ai temporairement résolu ce problème en l’important en tant que module extraKernel :
{
kernel,
stdenv,
lib,
fetchzip,
}:
stdenv.mkDerivation {
pname = "yt6801";
version = "1.0.29";
src = fetchzip {
url = "https://www.motor-comm.com/Public/Uploads/uploadfile/files/20240812/yt6801-linux-driver-1.0.29.zip";
sha256 = "sha256-oz6CeOUN6QWKXxe3WUZljhGDTFArsknjzBuQ4IchGeU=";
stripRoot = false;
};
nativeBuildInputs = kernel.moduleBuildDependencies;
preConfigure = "cd src";
This file has been truncated. show original
Désolé pour le français mal traduit.
2 Likes
@bartvdbraak Merci beaucoup pour avoir fait l’effort de répondre en français (très bien traduit) !
(Great thanks for your reply in (perfect) french!)
Et merci pour le lien vers tes fichiers de configuration : je vais essayer ça, en attendant que linuxPackages.yt6801: init at 1.0.29 by 5aaee9 · Pull Request #349513 · NixOS/nixpkgs · GitHub soit terminé et mergé.
(And a lot of thanks for the link to your configuration files: I gonna try that, waiting for the other PR to be completed and merged.)
Best regards
Comme il semble que yt6801 se trouve maintenant dans nixpkgs, j’ai tenté d’utiliser le module depuis nixpkgs au lieu de le recompiler. Je ne sais pas comment faire ça, visiblement, parce que cela n’a pas fonctionné.
Since yt6801 seems to be part of nixpkgs, I tried to use the module from nixpkgs instead of recompiling it. It seems that I don’t know how to do that, because it did not work.