Porting LabJackPython to nixpkg on linux-x86_64 (for using on NixOS or installed by nix or Nix flakes).
I only ported to linux-x86_64 because I cannot test other platforms. Pull requests are welcome.
To use without installing, you can use nix develop
:
nix develop github:UlyssesZh/LabJackPython-flake
or nix-shell
:
nix-shell --expr 'import "${fetchTarball https://github.com/UlyssesZh/LabJackPython-flake/archive/master.tar.gz}/shell.nix"'
Now, try using it:
python -c 'import LabJackPython; print(LabJackPython.GetDriverVersion())'
You may also add this flake as a dependency of other flakes.
You may find adding udev rules by this snippet useful:
{ pkgs, ... }: let
exodriver-flake = import (fetchTarball https://github.com/UlyssesZh/exodriver-flake/archive/master.tar.gz);
in {
# ...
services.udev.packages = [ exodriver-flake.packages.${pkgs.system}.exodriver ];
}
MIT.
The upstream exodriver is also MIT. See its source codes here.