1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00
nixpkgs/pkgs/misc/sane-backends/default.nix
Eelco Dolstra 7689a348c4 * Got rid of a lot of "postInstall=postInstall" and similar lines in
builders.  These are redundant now.
* Inlined some trivial builders.
* Removed a few explicit setup-hook creations.  This is done
  automatically now if setupHook is set.
* Deleted the initscripts package.  NixOS doesn't use it anymore.

svn path=/nixpkgs/branches/stdenv-updates/; revision=15276
2009-04-23 13:31:10 +00:00

32 lines
857 B
Nix

{stdenv, fetchurl, hotplugSupport ? false, libusb ? null,
gt68xxFirmware ? null}:
assert hotplugSupport -> stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "sane-backends-1.0.18";
src = fetchurl {
url = ftp://ftp.sane-project.org/pub/sane/sane-backends-1.0.18/sane-backends-1.0.18.tar.gz;
md5 = "7ca7e2908e24721471de92cf40c75e60";
};
udevSupport = hotplugSupport;
buildInputs = if libusb != null then [libusb] else [];
postInstall = ''
if test "$udevSupport" = "1"; then
ensureDir $out/etc/udev/rules.d/
cp tools/udev/libsane.rules $out/etc/udev/rules.d/60-libsane.rules
fi
'';
preInstall =
if gt68xxFirmware != null then
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " +
(gt68xxFirmware {inherit fetchurl;}) +
" \${out}/share/sane/gt68xx/PS1fw.usb "
else "";
}