sane-backends: fix firmware loading for gt86xx-based scanners

svn path=/nixpkgs/trunk/; revision=24280
This commit is contained in:
Evgeny Egorochkin 2010-10-14 11:54:19 +00:00
parent cd9d20d2e7
commit 9822e68b19

View File

@ -1,6 +1,8 @@
{ stdenv, fetchurl, hotplugSupport ? false, libusb ? null
, gt68xxFirmware ? null }:
let
firmware = gt68xxFirmware {inherit fetchurl;};
in
assert hotplugSupport -> stdenv.system == "i686-linux";
stdenv.mkDerivation {
@ -24,8 +26,7 @@ stdenv.mkDerivation {
preInstall =
if gt68xxFirmware != null then
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " +
(gt68xxFirmware {inherit fetchurl;}) +
" \${out}/share/sane/gt68xx/PS1fw.usb "
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
" \${out}/share/sane/gt68xx/" + firmware.name
else "";
}