1 { stdenv, lib, brscan5, netDevices ? [] }:
12 nix-build -E 'let pkgs = import ./. {};
13 brscan5-etc-files = pkgs.callPackage (import ./nixos/modules/services/hardware/sane_extra_backends/brscan5_etc_files.nix) {};
20 nix-build -E 'let pkgs = import ./. {};
21 brscan5-etc-files = pkgs.callPackage (import ./nixos/modules/services/hardware/sane_extra_backends/brscan5_etc_files.nix) {};
22 in brscan5-etc-files.override {
24 {name="a"; model="ADS-1200"; nodename="BRW0080927AFBCE";}
25 {name="b"; model="ADS-1200"; ip="192.168.1.2";}
38 ${if (lib.hasAttr "nodename" nd && nd.nodename != null) then
39 ''nodename="${nd.nodename}"'' else
41 addAllNetDev = xs: lib.concatStringsSep "\n" (map addNetDev xs);
46 name = "brscan5-etc-files";
48 src = "${brscan5}/opt/brother/scanner/brscan5";
50 nativeBuildInputs = [ brscan5 ];
55 TARGET_DIR="$out/etc/opt/brother/scanner/brscan5"
56 mkdir -p "$TARGET_DIR"
57 cp -rp "./models" "$TARGET_DIR"
58 cp -rp "./brscan5.ini" "$TARGET_DIR"
59 cp -rp "./brsanenetdevice.cfg" "$TARGET_DIR"
61 export NIX_REDIRECTS="/etc/opt/brother/scanner/brscan5/=$TARGET_DIR/"
63 printf '${addAllNetDev netDevices}\n'
65 ${addAllNetDev netDevices}
71 description = "Brother brscan5 sane backend driver etc files";
72 homepage = "https://www.brother.com";
73 platforms = platforms.linux;
74 license = licenses.unfree;
75 maintainers = with maintainers; [ mattchrist ];