1 {lib, stdenv, fetchurl, libusb-compat-0_1, makeWrapper}:
3 stdenv.mkDerivation rec {
7 url = "https://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv${version}LinuxMacSource.tar.gz";
8 sha256 = "1yjpi2qshnqfpan4w3ggakkr3znfrx5cxkny92ka7v9na3g2fc4h";
11 makeFlags = [ "LIBUSB=${libusb-compat-0_1.dev}" "linux" ];
14 mkdir -p $out/bin $out/share/pk2
16 cp PK2DeviceFile.dat $out/share/pk2
17 wrapProgram $out/bin/pk2cmd --prefix PATH : $out/share/pk2
20 nativeBuildInputs = [ makeWrapper ];
21 buildInputs = [ libusb-compat-0_1 ];
24 homepage = "https://www.microchip.com/pickit2";
25 license = lib.licenses.unfree; #MicroChip-PK2
26 description = "Microchip PIC programming software for the PICKit2 programmer";