2017-05-11 06:45:00 +01:00
|
|
|
{ stdenv, fetchurl, tcl, usb-modeswitch }:
|
2016-03-23 00:53:33 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "usb-modeswitch-data";
|
2018-03-17 12:21:34 +00:00
|
|
|
version = "20170806";
|
2016-03-23 00:53:33 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://www.draisberghof.de/usb_modeswitch/${pname}-${version}.tar.bz2";
|
2018-03-17 12:21:34 +00:00
|
|
|
sha256 = "0b1wari3aza6qjggqd0hk2zsh93k1q8scgmwh6f8wr0flpr3whff";
|
2017-02-18 03:35:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit (usb-modeswitch) makeFlags;
|
2016-03-23 00:53:33 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i 's@usb_modeswitch@${usb-modeswitch}/bin/usb_modeswitch@g' 40-usb_modeswitch.rules
|
|
|
|
'';
|
|
|
|
|
2017-02-18 03:35:25 +00:00
|
|
|
# we add tcl here so we can patch in support for new devices by dropping config into
|
|
|
|
# the usb_modeswitch.d directory
|
2017-05-11 06:45:00 +01:00
|
|
|
nativeBuildInputs = [ tcl ];
|
2016-03-23 00:53:33 +00:00
|
|
|
|
2017-02-18 03:35:25 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "Device database and the rules file for 'multi-mode' USB devices";
|
2017-02-18 03:35:25 +00:00
|
|
|
inherit (usb-modeswitch.meta) license maintainers platforms;
|
2016-03-23 00:53:33 +00:00
|
|
|
};
|
|
|
|
}
|