Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 44 lines 1.2 kB view raw
1{ stdenv 2, fetchFromGitHub 3, buildPythonPackage 4, pyusb 5, numpy 6}: 7 8## Usage 9# In NixOS, simply add the `udev` multiple output to services.udev.packages: 10# services.udev.packages = [ pkgs.python3Packages.seabreeze.udev ]; 11 12buildPythonPackage rec { 13 pname = "seabreeze"; 14 version = "0.6.0"; 15 16 src = fetchFromGitHub { 17 owner = "ap--"; 18 repo = "python-seabreeze"; 19 rev = "python-seabreeze-v${version}"; 20 sha256 = "0bc2s9ic77gz9m40w89snixphxlzib60xa4f49n4zasjrddfz1l8"; 21 }; 22 23 outputs = [ "out" "udev" ]; 24 25 postInstall = '' 26 mkdir -p $udev/lib/udev/rules.d 27 cp misc/10-oceanoptics.rules $udev/lib/udev/rules.d/10-oceanoptics.rules 28 ''; 29 30 # underlying c libraries are tested and fail 31 # (c libs are used with anaconda, which we don't care about as we use the alternative path, being that of pyusb). 32 doCheck = false; 33 34 propagatedBuildInputs = [ pyusb numpy ]; 35 36 setupPyBuildFlags = [ "--without-cseabreeze" ]; 37 38 meta = with stdenv.lib; { 39 homepage = "https://github.com/ap--/python-seabreeze"; 40 description = "A python library to access Ocean Optics spectrometers"; 41 maintainers = []; 42 license = licenses.mit; 43 }; 44}