From 41941e7cf350bf7737bf43c1b43f8ee782008ebf Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 28 Dec 2023 23:20:14 +0000 Subject: [PATCH] picoscope: fix `rules` eval Without the change `picoscope.rules` failed to evaluate due to wrong attribute path: $ nix build --no-link -f. picoscope.rules error: attribute 'writeTextDir' missing 116| # users.users.you.extraGroups = [ "pico" ]; 117| passthru.rules = lib.writeTextDir "lib/udev/rules.d/95-pico.rules" '' | ^ --- pkgs/applications/science/electronics/picoscope/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/electronics/picoscope/default.nix b/pkgs/applications/science/electronics/picoscope/default.nix index 596f220242bb..c7242117b68c 100644 --- a/pkgs/applications/science/electronics/picoscope/default.nix +++ b/pkgs/applications/science/electronics/picoscope/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, dpkg, makeWrapper , mono, gtk-sharp-3_0 -, glib, libusb1 , zlib, gtk3-x11, callPackage +, glib, libusb1 , zlib, gtk3-x11, callPackage, writeTextDir , scopes ? [ "picocv" "ps2000" @@ -114,7 +114,7 @@ in stdenv.mkDerivation rec { # services.udev.packages = [ pkgs.picoscope.rules ]; # users.groups.pico = {}; # users.users.you.extraGroups = [ "pico" ]; - passthru.rules = lib.writeTextDir "lib/udev/rules.d/95-pico.rules" '' + passthru.rules = writeTextDir "lib/udev/rules.d/95-pico.rules" '' SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ce9", MODE="664",GROUP="pico" '';