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