Skip to content

Comments

labrador: init at 0-unstable-2026-01-05#477199

Open
randomizedcoder wants to merge 1 commit intoNixOS:masterfrom
randomizedcoder:Labrador
Open

labrador: init at 0-unstable-2026-01-05#477199
randomizedcoder wants to merge 1 commit intoNixOS:masterfrom
randomizedcoder:Labrador

Conversation

@randomizedcoder
Copy link
Contributor

Summary

Add EspoTek Labrador - an open-source USB device that turns your PC into a full-featured electronics lab bench with oscilloscope, signal generator, logic analyzer, and multimeter functionality.

This package builds the Qt5 desktop application for interfacing with the Labrador hardware.

Features

  • Cross-platform: Supports Linux (x86_64, aarch64, i686, armv7l) and macOS (Darwin)
  • Firmware updates: Includes bundled libdfuprog library
  • Complete installation: Firmware files, waveforms, icons, and desktop file

udev rules (Linux)

For non-root USB access, users need to add udev rules. On NixOS:

services.udev.extraRules = ''
  ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="ba94", MODE="0666"
  ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="a000", MODE="0666"
  ENV{ID_VENDOR_ID}=="03eb", ENV{ID_MODEL_ID}=="2fe4", MODE="0666"
'';

Build verification

$ nix-build -A labrador
/nix/store/...-labrador-0-unstable-2026-01-05

$ ls result/bin/
labrador

$ ldd result/bin/.labrador-wrapped | grep -E "(Qt|fftw|usb)"
libfftw3_omp.so.3 => /nix/store/...-fftw-double-3.3.10/lib/libfftw3_omp.so.3
libusb-1.0.so.0 => /nix/store/...-libusb-1.0.29/lib/libusb-1.0.so.0
libfftw3.so.3 => /nix/store/...-fftw-double-3.3.10/lib/libfftw3.so.3
libQt5PrintSupport.so.5 => /nix/store/...-qtbase-5.15.18/lib/libQt5PrintSupport.so.5
libQt5Widgets.so.5 => /nix/store/...-qtbase-5.15.18/lib/libQt5Widgets.so.5
libQt5Gui.so.5 => /nix/store/...-qtbase-5.15.18/lib/libQt5Gui.so.5
libQt5Core.so.5 => /nix/store/...-qtbase-5.15.18/lib/libQt5Core.so.5

Application launches successfully and scans for USB device (expected "DEVICE NOT FOUND" without hardware connected).


Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jan 5, 2026
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/6238

'';
homepage = "https://github.com/espotek-org/Labrador";
license = lib.licenses.gpl3Only;
# maintainers = with lib.maintainers; [ randomizedcoder ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# maintainers = with lib.maintainers; [ randomizedcoder ];
maintainers = with lib.maintainers; [ randomizedcoder ];

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my github name hasn't landed in https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix yet. Once it does, I can add this line. ( Speaking of which, this maintainer-list.nix is very large. I wonder if it should be split by subdirs "aa" ... ? )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add yourself to that list. I don't think there are currently plans to split that file.

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jan 6, 2026
@randomizedcoder
Copy link
Contributor Author

@SuperSandro2000 Thanks for the review. - In general, if I want to document how a package.nix is setup, and why, what's the best way please? Could I make a README.md in the folder? The reason I ask is that I'm working on packaging Performance Co Pilot ( https://github.com/performancecopilot/pcp ) and it's a bit of a nightmare. Anyone coming back to look in a couple of months will be very confused.

@nixpkgs-ci nixpkgs-ci bot added the 8.has: package (new) This PR adds a new package label Jan 27, 2026
Add EspoTek Labrador - an open-source USB device that turns your PC into
a full-featured electronics lab bench with oscilloscope, signal generator,
logic analyzer, and multimeter functionality.

This package builds the Qt5 desktop application for interfacing with
the Labrador hardware.

Features:
- Cross-platform: Supports Linux (x86_64, aarch64, i686, armv7l) and macOS
- Includes bundled libdfuprog library for firmware updates
- Includes udev rules for non-root USB access on Linux
@randomizedcoder
Copy link
Contributor Author

Good idea about the udev rule. Updated, and fixed the commits (doh!)

Labrador now also has flake.nix
espotek-org/Labrador#393

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/6430

@SuperSandro2000
Copy link
Member

@SuperSandro2000 Thanks for the review. - In general, if I want to document how a package.nix is setup, and why, what's the best way please? Could I make a README.md in the folder? The reason I ask is that I'm working on packaging Performance Co Pilot ( performancecopilot/pcp ) and it's a bit of a nightmare. Anyone coming back to look in a couple of months will be very confused.

I would add comments to key lines that are not very intuitive and raise questions.

'';
homepage = "https://github.com/espotek-org/Labrador";
license = lib.licenses.gpl3Only;
# maintainers = with lib.maintainers; [ randomizedcoder ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# maintainers = with lib.maintainers; [ randomizedcoder ];
maintainers = with lib.maintainers; [ randomizedcoder ];

other bits are looking good

@randomizedcoder
Copy link
Contributor Author

@SuperSandro2000

Thanks again.

I made the mistake of including randomizedcoder maintainer into this PR, which I just fixed up
#473609

@randomizedcoder
Copy link
Contributor Author

@SuperSandro2000
I'm really wondering about making a bit of automation, maybe with a local LLM to do the nixpkgs code reviews

... And I also think we need some commit hooks for run nix fmt - I assume this has come up before, so I'm not sure why it didn't make progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants