nixpkgs/pkgs/tools/misc/pk2cmd/default.nix

27 lines
800 B
Nix
Raw Normal View History

2021-01-15 10:19:50 +01:00
{lib, stdenv, fetchurl, libusb-compat-0_1, makeWrapper}:
stdenv.mkDerivation {
name = "pk2cmd-1.20";
src = fetchurl {
url = "https://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv1.20LinuxMacSource.tar.gz";
sha256 = "1yjpi2qshnqfpan4w3ggakkr3znfrx5cxkny92ka7v9na3g2fc4h";
};
2020-04-28 05:29:39 +02:00
makeFlags = [ "LIBUSB=${libusb-compat-0_1.dev}" "linux" ];
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
'';
2020-04-28 05:29:39 +02:00
buildInputs = [ libusb-compat-0_1 makeWrapper ];
meta = {
homepage = "https://www.microchip.com/pickit2";
2021-01-15 10:19:50 +01:00
license = lib.licenses.unfree; #MicroChip-PK2
description = "Microchip PIC programming software for the PICKit2 programmer";
};
}