forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I needed a utility to simply change the USB Descriptor in the EEPROM of FTDI Chips. Thats why I add this utility to have an easy option available on Nix.
- Loading branch information
1 parent
25193bd
commit 9006995
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
fetchFromGitHub, | ||
libftdi, | ||
libusb1, | ||
pkg-config, | ||
}: | ||
stdenv.mkDerivation (finalAttrs: { | ||
|
||
pname = "ftx-prog"; | ||
version = "0.4"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "richardeoin"; | ||
repo = "ftx-prog"; | ||
rev = "v${finalAttrs.version}"; | ||
hash = "sha256-wBOzsJ1XIkswuwuCwGQk2Q+RUsGe5EOlbAhcf0R7rfc="; | ||
}; | ||
|
||
nativeBuildInputs = [ pkg-config ]; | ||
buildInputs = [ | ||
libftdi | ||
libusb1 | ||
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/bin | ||
mv ftx_prog $out/bin | ||
runHook postInstall | ||
''; | ||
|
||
meta = { | ||
description = "Command-line alternative to the FTDI FTProg utility for FTDI's FT-X series"; | ||
mainProgram = "ftx_prog"; | ||
homepage = "https://github.com/richardeoin/ftx-prog"; | ||
license = lib.licenses.gpl2Plus; | ||
platforms = lib.platforms.linux ++ lib.platforms.darwin; | ||
maintainers = [ lib.maintainers.funkeleinhorn ]; | ||
}; | ||
}) |