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 {
|
|
|
|
name = "usb-modeswitch-2.2.0";
|
2010-04-16 16:56:28 +01:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
src =fetchurl {
|
2014-07-18 17:11:16 +01:00
|
|
|
url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2";
|
|
|
|
sha256 = "0flaj3mq0xhzk72kkpclwglf77kcw5rkwvkaimn5zvbiw4yi0li7";
|
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
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/{etc,lib/udev,share/man/man1}
|
2010-04-16 16:56:28 +01:00
|
|
|
makeFlags="DESTDIR=$out PREFIX=$out"
|
|
|
|
'';
|
|
|
|
|
2014-07-18 17:11:16 +01:00
|
|
|
buildInputs = [ pkgconfig libusb1 ];
|
2010-04-16 16:56:28 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = "GPLv2";
|
2010-07-28 12:55:54 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.marcweber ];
|
2010-04-16 16:56:28 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|