1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, unittestCheckHook
5, setuptools-scm
6}:
7
8buildPythonPackage rec {
9 pname = "thorlabspm100";
10 version = "1.2.2";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "clade";
15 repo = "ThorlabsPM100";
16 rev = "v${version}";
17 hash = "sha256-X4qEow6u4aE0sbFwZfK3YEso2RS0c9j4iaWJPHaPQV4=";
18 };
19
20 nativeBuildInputs = [
21 setuptools-scm
22 ];
23
24 nativeCheckInputs = [
25 unittestCheckHook
26 ];
27
28 pythonImportsCheck = [
29 "ThorlabsPM100"
30 ];
31
32 meta = with lib; {
33 description = "Interface to the PM100A/D power meter from Thorlabs";
34 homepage = "https://github.com/clade/ThorlabsPM100/";
35 license = licenses.bsd3;
36 maintainers = with maintainers; [ fsagbuya ];
37 };
38}