From 5c51cf3559408ac39a4d6dda50b5d7de2a1f092a Mon Sep 17 00:00:00 2001 From: Ales Huzik Date: Fri, 19 Feb 2021 21:22:52 +1100 Subject: [PATCH] nxpmicro-mfgtools: add udev rules --- pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix b/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix index a35cc57b8257..8b603fbc5ce5 100644 --- a/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix +++ b/pkgs/development/tools/misc/nxpmicro-mfgtools/default.nix @@ -25,6 +25,14 @@ stdenv.mkDerivation rec { preConfigure = "echo ${version} > .tarball-version"; + postInstall = '' + # rules printed by the following invocation are static, + # they come from hardcoded configs in libuuu/config.cpp:48 + $out/bin/uuu -udev > udev-rules 2>stderr.txt + rules_file="$(cat stderr.txt|grep '1: put above udev run into'|sed 's|^.*/||')" + install -D udev-rules "$out/lib/udev/rules.d/$rules_file" + ''; + meta = with lib; { description = "Freescale/NXP I.MX chip image deploy tools"; longDescription = ''