From 9822e68b192ad4505f2ebdd813b8ebb5686efba1 Mon Sep 17 00:00:00 2001 From: Evgeny Egorochkin Date: Thu, 14 Oct 2010 11:54:19 +0000 Subject: [PATCH] sane-backends: fix firmware loading for gt86xx-based scanners svn path=/nixpkgs/trunk/; revision=24280 --- pkgs/misc/sane-backends/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/sane-backends/default.nix b/pkgs/misc/sane-backends/default.nix index 63fb29a7eb35..65e748b68fcf 100644 --- a/pkgs/misc/sane-backends/default.nix +++ b/pkgs/misc/sane-backends/default.nix @@ -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 ""; }