forked from mirrors/nixpkgs
1a6ed8a339
looks like common practice is to put a $out/sbin symlink to $out/bin. the `fxload` command was not available if only puts on $out/sbin. This will fix it. The real issue I observed was that there was no `/run/current-system/sw/sbin` on $PATH but i think there is a fundamental reason why it doesn’t exist hence this patch until i learn more.
32 lines
776 B
Nix
32 lines
776 B
Nix
{ lib
|
|
, stdenv
|
|
, libusb1
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "fxload";
|
|
version = libusb1.version;
|
|
dontUnpack = true;
|
|
dontBuild = true;
|
|
dontConfigure = true;
|
|
dontInstall = true;
|
|
dontPatch = true;
|
|
dontPatchELF = true;
|
|
|
|
# fxload binary exist inside the `examples/bin` directory of `libusb1`
|
|
postFixup = ''
|
|
mkdir -p $out/bin
|
|
ln -s ${passthru.libusb}/examples/bin/fxload $out/bin/fxload
|
|
'';
|
|
|
|
passthru.libusb = libusb1.override { withExamples = true; };
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/libusb/libusb";
|
|
description = "Tool to upload firmware to into an21, fx, fx2, fx2lp and fx3 ez-usb devices";
|
|
license = licenses.gpl2Only;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ realsnick ];
|
|
};
|
|
}
|