2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, libusb1, AppKit }:
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ecpdap";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.2.0";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "adamgreig";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
sha256 = "sha256-pgQqDRdewBSCm1/9/r8E9DBzwSKAaons3e6OLNv5gHM=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
cargoHash = "sha256-70Aq/gNfRv9JQyYWb7amYkfzFcNGCGbmCfJH4chbyyc=";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ libusb1 ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optional stdenv.hostPlatform.isDarwin AppKit;
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
|
|
|
cp drivers/*.rules $out/etc/udev/rules.d
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to program ECP5 FPGAs";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ecpdap";
|
2021-05-03 20:48:10 +00:00
|
|
|
longDescription = ''
|
|
|
|
ECPDAP allows you to program ECP5 FPGAs and attached SPI flash
|
|
|
|
using CMSIS-DAP probes in JTAG mode.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/adamgreig/ecpdap";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ expipiplus1 ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|