uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
46
pkgs/development/tools/misc/usb-modeswitch/default.nix
Normal file
46
pkgs/development/tools/misc/usb-modeswitch/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ stdenv, lib, fetchurl, pkg-config, makeWrapper
|
||||
, libusb1, tcl, util-linux, coreutils, bash }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "usb-modeswitch";
|
||||
version = "2.6.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.draisberghof.de/usb_modeswitch/${pname}-${version}.tar.bz2";
|
||||
sha256 = "18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2";
|
||||
};
|
||||
|
||||
patches = [ ./configurable-usb-modeswitch.patch ];
|
||||
|
||||
# Remove attempts to write to /etc and /var/lib.
|
||||
postPatch = ''
|
||||
sed -i \
|
||||
-e '/^\tinstall .* usb_modeswitch.conf/s,$(ETCDIR),$(out)/etc,' \
|
||||
-e '\,^\tinstall -d .*/var/lib/usb_modeswitch,d' \
|
||||
Makefile
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"ETCDIR=/etc"
|
||||
"USE_UPSTART=false"
|
||||
"USE_SYSTEMD=true"
|
||||
"SYSDIR=$(out)/lib/systemd/system"
|
||||
"UDEVDIR=$(out)/lib/udev"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/usb_modeswitch_dispatcher \
|
||||
--set PATH ${lib.makeBinPath [ util-linux coreutils bash ]}
|
||||
'';
|
||||
|
||||
buildInputs = [ libusb1 tcl ];
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A mode switching tool for controlling 'multi-mode' USB devices";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ marcweber peterhoeg ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue