2014-07-18 18:11:16 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libusb1 }:
|
2010-04-16 17:56:28 +02:00
|
|
|
|
2015-02-17 01:33:28 +01:00
|
|
|
let
|
2016-03-23 01:53:03 +01:00
|
|
|
version = "2.3.0";
|
2015-02-17 01:33:28 +01:00
|
|
|
in
|
|
|
|
|
2014-07-18 18:11:16 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-17 01:33:28 +01:00
|
|
|
name = "usb-modeswitch-${version}";
|
2010-04-16 17:56:28 +02:00
|
|
|
|
2015-02-17 01:33:28 +01:00
|
|
|
src = fetchurl {
|
2014-07-18 18:11:16 +02:00
|
|
|
url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2";
|
2015-02-17 01:33:28 +01:00
|
|
|
sha256 = "1jqih1g0y78w03rchpw7fjvzwjfakak61qjp7hbr1m5nnsh2dn9p";
|
2010-04-16 17:56:28 +02: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
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/{etc,lib/udev,share/man/man1}
|
2010-04-16 17:56:28 +02:00
|
|
|
makeFlags="DESTDIR=$out PREFIX=$out"
|
|
|
|
'';
|
|
|
|
|
2014-07-18 18:11:16 +02:00
|
|
|
buildInputs = [ pkgconfig libusb1 ];
|
2010-04-16 17:56:28 +02:00
|
|
|
|
|
|
|
meta = {
|
2016-03-23 01:53:03 +01:00
|
|
|
description = "a mode switching tool for controlling 'multi-mode' USB devices";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2010-07-28 13:55:54 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
2010-04-16 17:56:28 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|