nixpkgs-suyu/pkgs/development/embedded/fpga/ecpdap/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
975 B
Nix
Raw Normal View History

2021-05-14 23:33:51 +02:00
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, libusb1, AppKit }:
2021-04-29 09:21:17 +02:00
rustPlatform.buildRustPackage rec {
pname = "ecpdap";
2021-07-04 05:54:53 +02:00
version = "0.1.7";
2021-04-29 09:21:17 +02:00
src = fetchFromGitHub {
owner = "adamgreig";
repo = pname;
rev = "v${version}";
2021-07-04 05:54:53 +02:00
sha256 = "sha256-fdvpGmEy54i48H6YJ4E1LIuogimNEL8PJS5ScoW/6DM=";
2021-04-29 09:21:17 +02:00
};
2021-07-04 05:54:53 +02:00
cargoSha256 = "sha256-2YARNoHVDBwGr8FE/oRlNZMX/vCPIre7OnZbr04eF/M=";
2021-04-29 09:21:17 +02:00
nativeBuildInputs = [ pkg-config ];
2021-05-14 23:33:51 +02:00
buildInputs = [ libusb1 ]
++ lib.optional stdenv.isDarwin AppKit;
2021-04-29 09:21:17 +02:00
postInstall = ''
mkdir -p $out/etc/udev/rules.d
cp drivers/*.rules $out/etc/udev/rules.d
'';
2021-04-29 09:21:17 +02:00
meta = with lib; {
description = "A tool to program ECP5 FPGAs";
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 ];
};
}