depot/third_party/nixpkgs/pkgs/development/embedded/fpga/ecpdap/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

38 lines
999 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, libusb1, AppKit }:
rustPlatform.buildRustPackage rec {
pname = "ecpdap";
version = "0.2.0";
src = fetchFromGitHub {
owner = "adamgreig";
repo = pname;
rev = "v${version}";
sha256 = "sha256-pgQqDRdewBSCm1/9/r8E9DBzwSKAaons3e6OLNv5gHM=";
};
cargoHash = "sha256-70Aq/gNfRv9JQyYWb7amYkfzFcNGCGbmCfJH4chbyyc=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 ]
++ lib.optional stdenv.isDarwin AppKit;
postInstall = ''
mkdir -p $out/etc/udev/rules.d
cp drivers/*.rules $out/etc/udev/rules.d
'';
meta = with lib; {
description = "Tool to program ECP5 FPGAs";
mainProgram = "ecpdap";
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 ];
};
}