2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, fetchurl, libusb-compat-0_1, makeWrapper}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pk2cmd";
|
|
|
|
version = "1.20";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-09-18 10:52:07 +00:00
|
|
|
url = "https://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv${version}LinuxMacSource.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1yjpi2qshnqfpan4w3ggakkr3znfrx5cxkny92ka7v9na3g2fc4h";
|
|
|
|
};
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
makeFlags = [ "LIBUSB=${libusb-compat-0_1.dev}" "linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/pk2
|
|
|
|
cp pk2cmd $out/bin
|
|
|
|
cp PK2DeviceFile.dat $out/share/pk2
|
|
|
|
wrapProgram $out/bin/pk2cmd --prefix PATH : $out/share/pk2
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ libusb-compat-0_1 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.microchip.com/pickit2";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.unfree; #MicroChip-PK2
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Microchip PIC programming software for the PICKit2 programmer";
|
|
|
|
};
|
|
|
|
}
|