2015-04-23 23:07:29 +01:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, libusb1 }:
|
2013-02-23 11:05:22 +00:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
2015-04-23 23:07:29 +01:00
|
|
|
let
|
|
|
|
version = "1.1.0";
|
|
|
|
in
|
2013-02-23 11:05:22 +00:00
|
|
|
stdenv.mkDerivation {
|
2015-04-23 23:07:29 +01:00
|
|
|
name = "stlink-${version}";
|
2013-02-23 11:05:22 +00:00
|
|
|
|
2015-04-23 23:07:29 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/texane/stlink/archive/${version}.tar.gz";
|
|
|
|
sha256 = "0b38a32ids9dpnz5h892l279fz8y1zzqk1qsnyhl1nm03p7xzi1s";
|
2013-02-23 11:05:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ autoconf automake libtool pkgconfig libusb1 ];
|
|
|
|
preConfigure = "./autogen.sh";
|
|
|
|
|
2013-05-20 18:33:18 +01:00
|
|
|
meta = with stdenv.lib; {
|
2013-02-23 11:05:22 +00:00
|
|
|
description = "In-circuit debug and programming for ST-Link devices";
|
2013-05-20 18:33:18 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
2014-01-02 16:53:57 +00:00
|
|
|
maintainers = [ maintainers.bjornfor ];
|
2013-02-23 11:05:22 +00:00
|
|
|
};
|
|
|
|
}
|