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

30 lines
831 B
Nix
Raw Normal View History

{ stdenv, fetchurl, tcl, usb-modeswitch }:
2016-03-23 01:53:33 +01:00
stdenv.mkDerivation rec {
pname = "usb-modeswitch-data";
version = "20191128";
2016-03-23 01:53:33 +01:00
src = fetchurl {
url = "http://www.draisberghof.de/usb_modeswitch/${pname}-${version}.tar.bz2";
sha256 = "1ygahl3r26r38ai8yyblq9nhf3v5i6n6r6672p5wf88wg5h9n0rz";
};
2019-05-05 10:23:32 +02:00
makeFlags = [
"PREFIX=$(out)"
"DESTDIR=$(out)"
];
2016-03-23 01:53:33 +01:00
prePatch = ''
2019-05-05 10:23:32 +02:00
sed -i 's@usb_modeswitch@${usb-modeswitch}/lib/udev/usb_modeswitch@g' 40-usb_modeswitch.rules
2016-03-23 01:53:33 +01:00
'';
# we add tcl here so we can patch in support for new devices by dropping config into
# the usb_modeswitch.d directory
nativeBuildInputs = [ tcl ];
2016-03-23 01:53:33 +01:00
meta = with stdenv.lib; {
description = "Device database and the rules file for 'multi-mode' USB devices";
inherit (usb-modeswitch.meta) license maintainers platforms;
2016-03-23 01:53:33 +01:00
};
}