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