From d3c7a94b77864949896dd1641200d185c83fd23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Mon, 6 Feb 2017 20:09:45 +0100 Subject: [PATCH] openocd: 0.9.0 -> 0.10.0 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. --- pkgs/development/tools/misc/openocd/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/misc/openocd/default.nix b/pkgs/development/tools/misc/openocd/default.nix index ea52fff64cc..3349213a741 100644 --- a/pkgs/development/tools/misc/openocd/default.nix +++ b/pkgs/development/tools/misc/openocd/default.nix @@ -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 ]; @@ -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; {