stlink: 1.1.0 -> 1.3.0
[Bjørn: Upstream moved from autotools to cmake.]
This commit is contained in:
parent
4882e431c7
commit
9775a26da3
@ -1,30 +1,33 @@
|
|||||||
{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, libusb1 }:
|
{ stdenv, fetchurl, cmake, libusb1 }:
|
||||||
|
|
||||||
# IMPORTANT: You need permissions to access the stlink usb devices. Here are
|
# IMPORTANT: You need permissions to access the stlink usb devices.
|
||||||
# example udev rules for stlink v1 and v2 so you don't need to have root
|
# Add services.udev.pkgs = [ pkgs.stlink ] to your configuration.nix
|
||||||
# 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"
|
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "1.1.0";
|
version = "1.3.0";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "stlink-${version}";
|
name = "stlink-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/texane/stlink/archive/${version}.tar.gz";
|
url = "https://github.com/texane/stlink/archive/${version}.tar.gz";
|
||||||
sha256 = "0b38a32ids9dpnz5h892l279fz8y1zzqk1qsnyhl1nm03p7xzi1s";
|
sha256 = "3e8cba21744d2c38a0557f6835a05189e1b98202931bb0183d22efc462c893dd";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ autoconf automake libtool pkgconfig libusb1 ];
|
buildInputs = [ cmake libusb1 ];
|
||||||
preConfigure = "./autogen.sh";
|
patchPhase = ''
|
||||||
|
sed -i 's@/etc/udev/rules.d@$ENV{out}/etc/udev/rules.d@' CMakeLists.txt
|
||||||
|
sed -i 's@/etc/modprobe.d@$ENV{out}/etc/modprobe.d@' CMakeLists.txt
|
||||||
|
'';
|
||||||
|
preInstall = ''
|
||||||
|
mkdir -p $out/etc/udev/rules.d
|
||||||
|
mkdir -p $out/etc/modprobe.d
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "In-circuit debug and programming for ST-Link devices";
|
description = "In-circuit debug and programming for ST-Link devices";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ maintainers.bjornfor ];
|
maintainers = [ maintainers.bjornfor maintainers.rongcuid ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user