1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00
nixpkgs/pkgs/tools/misc/pk2cmd/default.nix
Lluís Batlle i Rossell 074e7db41a Adding an assertion for pk2cmd to build only on linux.
svn path=/nixpkgs/trunk/; revision=21728
2010-05-11 16:17:35 +00:00

29 lines
752 B
Nix

{stdenv, fetchurl, libusb, makeWrapper}:
assert stdenv.isLinux;
stdenv.mkDerivation {
name = "pk2cmd-1.20";
src = fetchurl {
url = http://ww1.microchip.com/downloads/en/DeviceDoc/pk2cmdv1.20LinuxMacSource.tar.gz;
sha256 = "1yjpi2qshnqfpan4w3ggakkr3znfrx5cxkny92ka7v9na3g2fc4h";
};
makeFlags = [ "LIBUSB=${libusb}" "linux" ];
installPhase = ''
ensureDir $out/bin $out/share/pk2
cp pk2cmd $out/bin
cp PK2DeviceFile.dat $out/share/pk2
wrapProgram $out/bin/pk2cmd --prefix PATH : $out/share/pk2
'';
buildInputs = [ libusb makeWrapper ];
meta = {
homepage = http://www.microchip.com/pickit2;
license = "nonfree";
description = "Microchip PIC programming software for the PICKit2 programmer";
};
}