1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 stdenv, 6 gcc12Stdenv, 7 8 # build-system 9 cython, 10 setuptools, 11 12 # tests 13 numpy, 14 unittestCheckHook, 15}: 16 17let 18 stdenv' = if stdenv.isLinux then gcc12Stdenv else stdenv; 19in 20buildPythonPackage rec { 21 pname = "faster-fifo"; 22 version = "1.4.5"; 23 format = "pyproject"; 24 25 # https://github.com/alex-petrenko/faster-fifo/issues/47\ 26 stdenv = stdenv'; 27 28 src = fetchFromGitHub { 29 owner = "alex-petrenko"; 30 repo = "faster-fifo"; 31 rev = "v${version}"; 32 hash = "sha256-35kD+RWXwUXHG5leTVj4wY6hJAjDka69YczgSTIbCeg="; 33 }; 34 35 nativeBuildInputs = [ 36 cython 37 setuptools 38 ]; 39 40 pythonImportsCheck = [ "faster_fifo" ]; 41 42 nativeCheckInputs = [ 43 numpy 44 unittestCheckHook 45 ]; 46 47 meta = with lib; { 48 description = "Faster alternative to Python's multiprocessing.Queue (IPC FIFO queue"; 49 homepage = "https://github.com/alex-petrenko/faster-fifo"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ hexa ]; 52 }; 53}