nixos/flashprog: Enable depending NixOS modules (#389346)

This commit is contained in:
Arne Keller
2025-04-26 23:10:07 +02:00
committed by GitHub
2 changed files with 11 additions and 2 deletions
+2
View File
@@ -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 ];
+9 -2
View File
@@ -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 {