16 nix-build -E 'let pkgs = import ./. {};
17 brscan5-etc-files = pkgs.callPackage (import ./nixos/modules/services/hardware/sane_extra_backends/brscan5_etc_files.nix) {};
24 nix-build -E 'let pkgs = import ./. {};
25 brscan5-etc-files = pkgs.callPackage (import ./nixos/modules/services/hardware/sane_extra_backends/brscan5_etc_files.nix) {};
26 in brscan5-etc-files.override {
28 {name="a"; model="ADS-1200"; nodename="BRW0080927AFBCE";}
29 {name="b"; model="ADS-1200"; ip="192.168.1.2";}
42 if (lib.hasAttr "nodename" nd && nd.nodename != null) then
43 ''nodename="${nd.nodename}"''
47 addAllNetDev = xs: lib.concatStringsSep "\n" (map addNetDev xs);
52 name = "brscan5-etc-files";
54 src = "${brscan5}/opt/brother/scanner/brscan5";
56 nativeBuildInputs = [ brscan5 ];
61 TARGET_DIR="$out/etc/opt/brother/scanner/brscan5"
62 mkdir -p "$TARGET_DIR"
63 cp -rp "./models" "$TARGET_DIR"
64 cp -rp "./brscan5.ini" "$TARGET_DIR"
65 cp -rp "./brsanenetdevice.cfg" "$TARGET_DIR"
67 export NIX_REDIRECTS="/etc/opt/brother/scanner/brscan5/=$TARGET_DIR/"
69 printf '${addAllNetDev netDevices}\n'
71 ${addAllNetDev netDevices}
77 description = "Brother brscan5 sane backend driver etc files";
78 homepage = "https://www.brother.com";
79 platforms = platforms.linux;
80 license = licenses.unfree;
81 maintainers = with maintainers; [ mattchrist ];