nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 pkg-config,
6 libusb1,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "ecpdap";
11 version = "0.2.0";
12
13 src = fetchFromGitHub {
14 owner = "adamgreig";
15 repo = "ecpdap";
16 rev = "v${version}";
17 sha256 = "sha256-pgQqDRdewBSCm1/9/r8E9DBzwSKAaons3e6OLNv5gHM=";
18 };
19
20 cargoHash = "sha256-o+qm4MFZt+BzqhQsaI5EU9lZz4LI9D75eL+VKIKbIyI=";
21
22 nativeBuildInputs = [ pkg-config ];
23
24 buildInputs = [ libusb1 ];
25
26 doInstallCheck = true;
27
28 postInstall = ''
29 mkdir -p $out/etc/udev/rules.d
30 cp drivers/*.rules $out/etc/udev/rules.d
31 '';
32
33 meta = with lib; {
34 description = "Tool to program ECP5 FPGAs";
35 mainProgram = "ecpdap";
36 longDescription = ''
37 ECPDAP allows you to program ECP5 FPGAs and attached SPI flash
38 using CMSIS-DAP probes in JTAG mode.
39 '';
40 homepage = "https://github.com/adamgreig/ecpdap";
41 license = licenses.asl20;
42 maintainers = [ ];
43 };
44}