summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/thorlabspm100/default.nix
blob: 84c6b88e259d1c17d7b3398a675b217f4e66dd9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  unittestCheckHook,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "thorlabspm100";
  version = "1.2.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "clade";
    repo = "ThorlabsPM100";
    rev = "v${version}";
    hash = "sha256-X4qEow6u4aE0sbFwZfK3YEso2RS0c9j4iaWJPHaPQV4=";
  };

  nativeBuildInputs = [ setuptools-scm ];

  nativeCheckInputs = [ unittestCheckHook ];

  pythonImportsCheck = [ "ThorlabsPM100" ];

  meta = {
    description = "Interface to the PM100A/D power meter from Thorlabs";
    homepage = "https://github.com/clade/ThorlabsPM100/";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ fsagbuya ];
  };
}