Device will not connect on NixOS

When starting the application, I get an error. See following screenshot.
image

This directory does exist. It is however a symbolic link. See following screenshot.
image

Here is my udev rule

$ cat /etc/udev/rules.d/99-local.rules
...
# Saleae Logic analyzer (USB Based)
# Bus 006 Device 006: ID 0925:3881 Lakeview Research
# Bus 001 Device 009: ID 21a9:1004 Product: Logic S/16, Manufacturer: Saleae LLC

ATTR{idVendor}=="0925", ATTR{idProduct}=="3881", MODE="0666", GROUP="plugdev"
ATTR{idVendor}=="21a9", ATTR{idProduct}=="1004", MODE="0666", GROUP="plugdev"
...

I removed GROUP = “plugdev” since that group does not exist on NixOS

@seanybaggins1 Thanks for writing this in. With regards to Linux support, we officially test and validate our software on Ubuntu only. Having said that, I’d be happy to see if we can get you up and running.

The first thing I notice is that the .rules files looks like it’s named incorrectly.

We provide some instructions at the bottom of the support article below (under the section “Linux Ubuntu Instructions”). Could you try downloading the provided rules file and copy it to the mentioned directory?

Hello Seany, How did you get Logic 2 to work in NixOS? I am stuck with the Error Connecting Socket on the start screen. Using Appimage-run and put all the rules into the configuration.nix udev. I know this is a old post but I cant find anything about this. Thank you!

@Daaboulex That problem does not relate to the original, but because it’s not really documented I’ll explain what I found anyway (I needed to write this down somewhere)
There are the packages saleae-logic and saleae-logic-2 in nixos that both work, but updating to the latest version not only requires a change of url but also does not work (same as the latest appimage. Maybe older appimages would still work? Who knows)
I think in the latest version they added new requirements that were not there before and when they can’t be loaded the app gets stuck on that screen ‘Error Connecting Socket’.

Attached is a replacement config that works for those who want it. It also uses the udev rules from the app itself without needing to manually define it.

Config
{ lib, fetchurl, appimageTools }:
let
  pname = "saleae-logic-2";
  version = "2.4.40";
  src = fetchurl {
    url = "https://downloads2.saleae.com/logic2/Logic-${version}-linux-x64.AppImage";
    sha256 = "sha256-TG7fH8b0L/O8RjlMB3QJM3/8my49uBX2RwufrVWDgpI=";
  };
in
appimageTools.wrapType2 {
  inherit pname version src;

  extraPkgs = pkgs: with pkgs; [
    stdenv.cc.cc.lib
    libxcrypt-legacy
    libusb1
  ];

  meta = with lib; {
    homepage = "https://www.saleae.com/";
    description = "Software for Saleae logic analyzers";
    license = licenses.unfree;
    platforms = [ "x86_64-linux" ];
    maintainers = [  ];
  };
}
Usage

In any packages list (home or system): (pkgs.callPackage ./path/to/logic2.nix {})

To use the udev rules: (put in a system config)

  services.udev.packages = [
    (pkgs.callPackage ./users/grapefru14/extraPkgs/logic2.nix {})
  ];

Although funly enough this config gives a popup the same as the original post, but it still works.

After a bit more searching I found out that although saleae-logic-2 on nixos 25.11 is a past version, the package on master is not. (And it uses fixes similar to what I did in the config above)

I don’t know whether this is good design but you can add another input to your flake.nix nixpkgs-master.url = "github:NixOS/nixpkgs/master"; and use it with

master-pkgs = import nixpkgs-master {
  system = system;
  config.allowUnfree = true;
};

and in a package list just include master-pkgs.saleae-logic-2 and that should work too.

You can also put

services.udev.packages = [
  master-pkgs.saleae-logic-2
];

In some config to get the udev package from the app!