lol

Merge pull request #208253 from realsnick/fix/fxload

fxload: updated to newer version from libusb1’s examples

authored by

Anderson Torres and committed by
GitHub
32c8f85b fc07700a

+20 -26
+20 -26
pkgs/os-specific/linux/fxload/default.nix
··· 1 - {lib, stdenv, fetchurl}: 1 + { lib 2 + , stdenv 3 + , libusb1 4 + }: 2 5 3 6 stdenv.mkDerivation rec { 4 7 pname = "fxload"; 5 - version = "2002.04.11"; 6 - 7 - src = fetchurl { 8 - url = "mirror://sourceforge/linux-hotplug/fxload-${lib.replaceStrings ["."] ["_"] version}.tar.gz"; 9 - sha256 = "1hql93bp3dxrv1p67nc63xsbqwljyynm997ysldrc3n9ifi6s48m"; 10 - }; 11 - 12 - patches = [ 13 - # Will be needed after linux-headers is updated to >= 2.6.21. 14 - (fetchurl { 15 - url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/sys-apps/fxload/files/fxload-20020411-linux-headers-2.6.21.patch?rev=1.1"; 16 - sha256 = "0ij0c8nr1rbyl5wmyv1cklhkxglvsqz32h21cjw4bjm151kgmk7p"; 17 - }) 18 - ]; 19 - 20 - preBuild = '' 21 - substituteInPlace Makefile --replace /usr / 22 - makeFlagsArray=(INSTALL=install prefix=$out) 23 - ''; 8 + version = libusb1.version; 9 + dontUnpack = true; 10 + dontBuild = true; 11 + dontConfigure = true; 12 + dontInstall = true; 13 + dontPatch = true; 14 + dontPatchELF = true; 24 15 25 - preInstall = '' 16 + # fxload binary exist inside the `examples/bin` directory of `libusb1` 17 + postFixup = '' 26 18 mkdir -p $out/sbin 27 - mkdir -p $out/share/man/man8 28 - mkdir -p $out/share/usb 19 + ln -s ${passthru.libusb}/examples/bin/fxload $out/sbin/fxload 29 20 ''; 30 21 22 + passthru.libusb = libusb1.override { withExamples = true; }; 23 + 31 24 meta = with lib; { 32 - homepage = "http://linux-hotplug.sourceforge.net/?selected=usb"; 33 - description = "Tool to upload firmware to Cypress EZ-USB microcontrollers"; 34 - license = licenses.gpl2; 25 + homepage = "https://github.com/libusb/libusb"; 26 + description = "Tool to upload firmware to into an21, fx, fx2, fx2lp and fx3 ez-usb devices"; 27 + license = licenses.gpl2Only; 35 28 platforms = platforms.linux; 29 + maintainers = with maintainers; [ realsnick ]; 36 30 }; 37 31 }