nixpkgs/pkgs/development/tools/misc/usb-modeswitch/default.nix

31 lines
764 B
Nix
Raw Normal View History

2014-07-18 17:11:16 +01:00
{ stdenv, fetchurl, pkgconfig, libusb1 }:
2015-02-17 00:33:28 +00:00
let
version = "2.2.1";
in
2014-07-18 17:11:16 +01:00
stdenv.mkDerivation rec {
2015-02-17 00:33:28 +00:00
name = "usb-modeswitch-${version}";
2015-02-17 00:33:28 +00:00
src = fetchurl {
2014-07-18 17:11:16 +01:00
url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2";
2015-02-17 00:33:28 +00:00
sha256 = "1jqih1g0y78w03rchpw7fjvzwjfakak61qjp7hbr1m5nnsh2dn9p";
};
# 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
mkdir -p $out/{etc,lib/udev,share/man/man1}
makeFlags="DESTDIR=$out PREFIX=$out"
'';
2014-07-18 17:11:16 +01:00
buildInputs = [ pkgconfig libusb1 ];
meta = {
license = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.marcweber ];
platforms = stdenv.lib.platforms.linux;
};
}