2023-05-24 13:37:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, libusb1 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wch-isp";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.4.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmaselbas";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-cTePTpzvWf2DdInhBxFY72aVNb0SAlCHb/tUwNqqX1U=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ libusb1 ];
|
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
|
|
|
|
installTargets = [ "install" "install-rules" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Firmware programmer for WCH microcontrollers over USB";
|
|
|
|
license = lib.licenses.gpl2Only;
|
|
|
|
homepage = "https://github.com/jmaselbas/wch-isp";
|
|
|
|
maintainers = with lib.maintainers; [ lesuisse ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|