lol
1{ stdenv, fetchurl, tcl, usb-modeswitch }:
2
3stdenv.mkDerivation rec {
4 name = "usb-modeswitch-data-${version}";
5 version = "20170205";
6
7 src = fetchurl {
8 url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2";
9 sha256 = "1l9q4xk02zd0l50bqhyk906wbcs26ji7259q0f7qv3cj52fzvp72";
10 };
11
12 inherit (usb-modeswitch) makeFlags;
13
14 prePatch = ''
15 sed -i 's@usb_modeswitch@${usb-modeswitch}/bin/usb_modeswitch@g' 40-usb_modeswitch.rules
16 '';
17
18 # we add tcl here so we can patch in support for new devices by dropping config into
19 # the usb_modeswitch.d directory
20 nativeBuildInputs = [ tcl ];
21
22 meta = with stdenv.lib; {
23 description = "Device database and the rules file for 'multi-mode' USB devices";
24 inherit (usb-modeswitch.meta) license maintainers platforms;
25 };
26}