nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 32 lines 843 B view raw
1{ stdenv, fetchurl, pkgconfig, libusb1 }: 2 3stdenv.mkDerivation rec { 4 name = "usb-modeswitch-${version}"; 5 version = "2.5.2"; 6 7 src = fetchurl { 8 url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2"; 9 sha256 = "19ifi80g9ns5dmspchjvfj4ykxssq9yrci8m227dgb3yr04srzxb"; 10 }; 11 12 makeFlags = [ 13 "DESTDIR=$(out)" 14 "PREFIX=$(out)" 15 ]; 16 17 # make clean: we always build from source. It should be necessary on x86_64 only 18 preConfigure = '' 19 find -type f | xargs sed 's@/bin/rm@rm@g' -i 20 make clean 21 ''; 22 23 buildInputs = [ libusb1 ]; 24 nativeBuildInputs = [ pkgconfig ]; 25 26 meta = with stdenv.lib; { 27 description = "A mode switching tool for controlling 'multi-mode' USB devices"; 28 license = licenses.gpl2; 29 maintainers = with maintainers; [ marcweber peterhoeg ]; 30 platforms = platforms.linux; 31 }; 32}