nixpkgs/pkgs/development/tools/misc/usb-modeswitch/data.nix
Peter Hoeg cad335eb01 usb-modeswitch-data: 20160112 -> 20170205
Plus some minor cleanups.
2017-02-18 11:35:25 +08:00

28 lines
874 B
Nix

{ stdenv, fetchurl, pkgconfig, libusb1, tcl, usb-modeswitch }:
stdenv.mkDerivation rec {
name = "usb-modeswitch-data-${version}";
version = "20170205";
src = fetchurl {
url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2";
sha256 = "1l9q4xk02zd0l50bqhyk906wbcs26ji7259q0f7qv3cj52fzvp72";
};
inherit (usb-modeswitch) makeFlags;
prePatch = ''
sed -i 's@usb_modeswitch@${usb-modeswitch}/bin/usb_modeswitch@g' 40-usb_modeswitch.rules
'';
buildInputs = [ libusb1 usb-modeswitch ];
# we add tcl here so we can patch in support for new devices by dropping config into
# the usb_modeswitch.d directory
nativeBuildInputs = [ pkgconfig tcl ];
meta = with stdenv.lib; {
description = "Device database and the rules file for 'multi-mode' USB devices";
inherit (usb-modeswitch.meta) license maintainers platforms;
};
}