mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixos/flashprog: Enable depending NixOS modules (#389346)
This commit is contained in:
commit
c632b25205
2 changed files with 11 additions and 2 deletions
|
@ -20,6 +20,8 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
services.udev.packages = [ cfg.package ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
hardware.libjaylink.enable = true;
|
||||
hardware.libftdi.enable = true;
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ felixsinger ];
|
||||
|
|
|
@ -46,9 +46,16 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
libgpiod
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Remove these rules from flashprog to avoid conflicts with libftdi
|
||||
sed -i"" '/ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001"/d' "util/50-flashprog.rules"
|
||||
sed -i"" '/ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010"/d' "util/50-flashprog.rules"
|
||||
sed -i"" '/ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011"/d' "util/50-flashprog.rules"
|
||||
sed -i"" '/ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014"/d' "util/50-flashprog.rules"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cd "$src"
|
||||
install -Dm644 util/50-flashprog.rules "$out/lib/udev/rules.d/50-flashprog.rules"
|
||||
install -Dm644 ../util/50-flashprog.rules "$out/lib/udev/rules.d/50-flashprog.rules"
|
||||
'';
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue