2014-07-18 17:11:16 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libusb1 }:
|
2010-04-16 16:56:28 +01:00
|
|
|
|
2014-07-18 17:11:16 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-17 00:33:28 +00:00
|
|
|
name = "usb-modeswitch-${version}";
|
2018-02-28 02:35:02 +00:00
|
|
|
version = "2.5.2";
|
2010-04-16 16:56:28 +01:00
|
|
|
|
2015-02-17 00:33:28 +00:00
|
|
|
src = fetchurl {
|
2017-02-18 03:35:02 +00:00
|
|
|
url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2";
|
2018-02-28 02:35:02 +00:00
|
|
|
sha256 = "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb";
|
2010-04-16 16:56:28 +01:00
|
|
|
};
|
|
|
|
|
2017-02-18 03:35:02 +00:00
|
|
|
makeFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
];
|
|
|
|
|
2010-04-16 16:56:28 +01:00
|
|
|
# make clean: we always build from source. It should be necessary on x86_64 only
|
|
|
|
preConfigure = ''
|
|
|
|
find -type f | xargs sed 's@/bin/rm@rm@g' -i
|
|
|
|
make clean
|
|
|
|
'';
|
|
|
|
|
2017-02-18 03:35:02 +00:00
|
|
|
buildInputs = [ libusb1 ];
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2010-04-16 16:56:28 +01:00
|
|
|
|
2017-02-18 03:35:02 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "A mode switching tool for controlling 'multi-mode' USB devices";
|
2017-02-18 03:35:02 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ marcweber peterhoeg ];
|
|
|
|
platforms = platforms.linux;
|
2010-04-16 16:56:28 +01:00
|
|
|
};
|
|
|
|
}
|