barebones usb_modeswitch package
This commit is contained in:
parent
fc9cb8e07d
commit
9cb73f3fec
3 changed files with 42 additions and 0 deletions
|
@ -271,6 +271,8 @@ extraPkgs // {
|
|||
'';
|
||||
};
|
||||
|
||||
libusb1 = prev.libusb1.override { enableUdev = false; };
|
||||
|
||||
util-linux-small = prev.util-linux.override {
|
||||
ncursesSupport = false;
|
||||
pamSupport = false;
|
||||
|
|
|
@ -110,6 +110,7 @@ in {
|
|||
systemconfig = callPackage ./systemconfig {};
|
||||
tufted = callPackage ./tufted {};
|
||||
uevent-watch = callPackage ./uevent-watch {};
|
||||
usb-modeswitch = callPackage ./usb-modeswitch {};
|
||||
writeAshScript = callPackage ./write-ash-script {};
|
||||
writeFennel = callPackage ./write-fennel {};
|
||||
writeFennelScript = callPackage ./write-fennel-script {};
|
||||
|
|
39
pkgs/usb-modeswitch/default.nix
Normal file
39
pkgs/usb-modeswitch/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
# usb modeswitch without udev, tcl, coreutils, bash dependencies
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, libusb1
|
||||
}:
|
||||
let
|
||||
pname = "usb-modeswitch";
|
||||
version = "2.6.0";
|
||||
in stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.draisberghof.de/usb_modeswitch/${pname}-${version}.tar.bz2";
|
||||
sha256 = "18wbbxc5cfsmikba0msdvd5qlaga27b32nhrzicyd9mdddp265f2";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=(LIBS="$($PKG_CONFIG --libs --cflags libusb-1.0)")
|
||||
'';
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"usb_modeswitch"
|
||||
];
|
||||
|
||||
buildInputs = [ libusb1 ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp usb_modeswitch $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.gpl2;
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue