Skip to content

Commit

Permalink
openocd: 0.9.0 -> 0.10.0
Browse files Browse the repository at this point in the history
Announcement:
http://openocd.org/2017/01/openocd-0-10-0-release-is-out/

The udev rules were renamed. Add code to automatically detect renames in
the future.
  • Loading branch information
bjornfor committed Feb 6, 2017
1 parent 82c1d98 commit d3c7a94
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkgs/development/tools/misc/openocd/default.nix
Expand Up @@ -2,11 +2,11 @@

stdenv.mkDerivation rec {
name = "openocd-${version}";
version = "0.9.0";
version = "0.10.0";

src = fetchurl {
url = "mirror://sourceforge/openocd/openocd-${version}.tar.bz2";
sha256 = "0hzlnm19c4b35vsxs6ik94xbigv3ykdgr8gzrdir6sqmkan44w43";
sha256 = "1bhn2c85rdz4gf23358kg050xlzh7yxbbwmqp24c0akmh3bff4kk";
};

buildInputs = [ libftdi libusb1 pkgconfig hidapi ];
Expand All @@ -26,7 +26,12 @@ stdenv.mkDerivation rec {

postInstall = ''
mkdir -p "$out/etc/udev/rules.d"
ln -s "$out/share/openocd/contrib/99-openocd.rules" "$out/etc/udev/rules.d/99-openocd.rules"
rules="$out/share/openocd/contrib/60-openocd.rules"
if [ ! -f "$rules" ]; then
echo "$rules is missing, must update the Nix file."
exit 1
fi
ln -s "$rules" "$out/etc/udev/rules.d/"
'';

meta = with stdenv.lib; {
Expand Down

0 comments on commit d3c7a94

Please sign in to comment.