2013-02-23 12:05:22 +01:00
|
|
|
{ stdenv, fetchgit, autoconf, automake, libtool, pkgconfig, libusb1 }:
|
|
|
|
|
|
|
|
# IMPORTANT: You need permissions to access the stlink usb devices. Here are
|
|
|
|
# example udev rules for stlink v1 and v2 so you don't need to have root
|
|
|
|
# permissions (copied from <stlink>/49-stlink*.rules):
|
|
|
|
#
|
|
|
|
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", MODE:="0666", SYMLINK+="stlinkv1_%n"
|
|
|
|
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE:="0666", SYMLINK+="stlinkv2_%n"
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2013-11-13 23:25:48 +01:00
|
|
|
name = "stlink-20130306";
|
2013-02-23 12:05:22 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = git://github.com/texane/stlink.git;
|
|
|
|
rev = "5be889e3feb75fc7f594012c4855b4dc16940050";
|
2013-11-13 23:28:24 +01:00
|
|
|
sha256 = "1xbfr1kz4k6hhl0xpqn1vi83fdynjxx3ymn9gb7b0pb7h6ncjcyr";
|
2013-02-23 12:05:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ autoconf automake libtool pkgconfig libusb1 ];
|
|
|
|
preConfigure = "./autogen.sh";
|
|
|
|
|
2013-05-20 19:33:18 +02:00
|
|
|
meta = with stdenv.lib; {
|
2013-02-23 12:05:22 +01:00
|
|
|
description = "In-circuit debug and programming for ST-Link devices";
|
2013-05-20 19:33:18 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
2013-05-21 09:20:00 +02:00
|
|
|
maintainers = [maintainers.bjornfor];
|
2013-02-23 12:05:22 +01:00
|
|
|
};
|
|
|
|
}
|