2024-04-21 15:54:59 +00:00
|
|
|
{ lib, stdenv, fetchFromSourcehut, pkg-config, libusb1 }:
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wch-isp";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.4.1";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~jmaselbas";
|
2023-05-24 13:37:59 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-JB7cvZPzRhYJ8T3QJkguHOzZFrLOft5rRz0F0sVav/k=";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "wch-isp";
|
2023-05-24 13:37:59 +00:00
|
|
|
license = lib.licenses.gpl2Only;
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://git.sr.ht/~jmaselbas/wch-isp";
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with lib.maintainers; [ lesuisse ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|