Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.4 kB view raw
1{ lib 2, fetchFromGitHub 3, buildPythonPackage 4, cython 5, git 6, pkgconfig 7, setuptools-scm 8, future 9, numpy 10, pyusb 11, mock 12, pytestCheckHook 13, zipp 14}: 15 16## Usage 17# In NixOS, add the package to services.udev.packages for non-root plugdev 18# users to get device access permission: 19# services.udev.packages = [ pkgs.python3Packages.seabreeze ]; 20 21buildPythonPackage rec { 22 pname = "seabreeze"; 23 version = "1.3.0"; 24 25 src = fetchFromGitHub { 26 owner = "ap--"; 27 repo = "python-seabreeze"; 28 rev = "v${version}"; 29 sha256 = "1hm9aalpb9sdp8s7ckn75xvyiacp5678pv9maybm5nz0z2h29ibq"; 30 leaveDotGit = true; 31 }; 32 33 postPatch = '' 34 substituteInPlace setup.py \ 35 --replace '"pytest-runner",' "" 36 ''; 37 38 nativeBuildInputs = [ 39 cython 40 git 41 pkgconfig 42 setuptools-scm 43 ]; 44 45 propagatedBuildInputs = [ 46 future 47 numpy 48 pyusb 49 ]; 50 51 postInstall = '' 52 mkdir -p $out/etc/udev/rules.d 53 cp os_support/10-oceanoptics.rules $out/etc/udev/rules.d/10-oceanoptics.rules 54 ''; 55 56 # few backends enabled, but still some tests 57 nativeCheckInputs = [ 58 pytestCheckHook 59 mock 60 zipp 61 ]; 62 63 setupPyBuildFlags = [ "--without-cseabreeze" ]; 64 65 meta = with lib; { 66 homepage = "https://github.com/ap--/python-seabreeze"; 67 description = "A python library to access Ocean Optics spectrometers"; 68 maintainers = []; 69 license = licenses.mit; 70 }; 71}